JP2018022472A - Program and information processing system - Google Patents

Program and information processing system Download PDF

Info

Publication number
JP2018022472A
JP2018022472A JP2017096262A JP2017096262A JP2018022472A JP 2018022472 A JP2018022472 A JP 2018022472A JP 2017096262 A JP2017096262 A JP 2017096262A JP 2017096262 A JP2017096262 A JP 2017096262A JP 2018022472 A JP2018022472 A JP 2018022472A
Authority
JP
Japan
Prior art keywords
array
character string
data
information processing
data aggregate
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2017096262A
Other languages
Japanese (ja)
Other versions
JP6511598B2 (en
Inventor
大 益滿
Masaru Masumitsu
大 益滿
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Masumitsu Dai
Original Assignee
Masumitsu Dai
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Masumitsu Dai filed Critical Masumitsu Dai
Publication of JP2018022472A publication Critical patent/JP2018022472A/en
Application granted granted Critical
Publication of JP6511598B2 publication Critical patent/JP6511598B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

PROBLEM TO BE SOLVED: To provide a program and an information processing system capable of transferring data about a data aggregate of a structure or the like.SOLUTION: A program 12P causes an information processing device to execute arrangement creation processing for storing data stored in one or more members included in a data aggregate in one or more elements of arrangement, and character string creation processing for creating a character string including the data stored in the one or more elements of the arrangement and a delimiter character for delimiting the data. A data aggregate can be converted into a character string and transferred to another information processing device.SELECTED DRAWING: Figure 1

Description

本発明は、情報処理装置から他の情報処理装置へデータを転送することを可能にするプログラム及び情報処理システムに関する。   The present invention relates to a program and an information processing system that enable data to be transferred from an information processing device to another information processing device.

従来、区切り文字により区切られたテキストデータを転送するプログラムが知られている(例えば、特許文献1参照)。   Conventionally, a program for transferring text data delimited by delimiters is known (for example, see Patent Document 1).

特開2000−57231号公報JP 2000-57231 A

しかし、特許文献1に開示された技術では、複数のデータにより構成される構造体等のデータ集合体に対応することが難しいという問題がある。ここで、データ集合体は、配列、連想配列、構造体、ユーザ定義型の変数、クラス及び共用体等、0個以上の値を持つことができる変数である。変数には、オブジェクト、及びオブジェクトのインスタンスが含まれる。構造体等のデータ集合体は、夫々に変数である0個以上のメンバを含んでいる。データ集合体中の変数が要素と呼称される場合は、メンバには要素が含まれる。0個以上のメンバは、順番等の互いの関係が定義されており、0個以上の何れかにデータが代入される。   However, the technique disclosed in Patent Document 1 has a problem that it is difficult to deal with a data aggregate such as a structure composed of a plurality of data. Here, the data aggregate is a variable that can have zero or more values, such as an array, an associative array, a structure, a user-defined type variable, a class, and a union. The variable includes an object and an instance of the object. A data aggregate such as a structure includes zero or more members, each of which is a variable. When a variable in a data collection is called an element, the member includes the element. Zero or more members are defined in relation to each other such as an order, and data is assigned to any of the zero or more members.

本発明は、斯かる事情に鑑みてなされたものであって、その目的とするところは、データ集合体に係るデータを転送することができるプログラム及び情報処理システムを提供することにある。   The present invention has been made in view of such circumstances, and an object of the present invention is to provide a program and an information processing system capable of transferring data relating to a data aggregate.

本発明の一態様のプログラムは、データ集合体に含まれる一個以上のメンバに格納されたデータを、配列の一個以上の要素に格納する配列作成処理と、前記配列の一個以上の要素に格納されたデータ及びデータの区切りを示す区切り文字を含んだ文字列を作成する文字列作成処理とを情報処理装置に実行させる。   The program of one embodiment of the present invention includes an array creation process for storing data stored in one or more members included in a data aggregate in one or more elements of an array, and stored in one or more elements of the array. The information processing apparatus is caused to execute character string creation processing for creating a character string including data and a delimiter indicating a data delimiter.

本発明の一態様の情報処理システムは、第1情報処理装置及び第2情報処理装置を通信網で接続した情報処理システムであって、前記第1情報処理装置は、データ集合体に含まれる一個以上のメンバに格納されたデータを、予め定められている対応関係に従って、配列の一個以上の要素に格納する第1配列作成部と、前記配列の一個以上の要素に格納されたデータ及びデータの区切りを示す区切り文字を含んだ文字列を作成する文字列作成部と、該文字列作成部が作成した文字列を出力する出力部とを備え、前記第2情報処理装置は、前記データ集合体の一個以上のメンバと前記配列の一個以上の要素との間の前記対応関係を前記第1情報処理装置と共有しており、前記出力部が出力した文字列を取得する取得部と、該取得部で取得した文字列を、前記区切り文字に基づいて0個以上のデータへ変換し、一個以上のデータを配列の一個以上の要素に格納する第2配列作成部と、前記配列の一個以上の要素に格納されたデータを、前記対応関係に従って、データ集合体に含まれる一個以上のメンバに格納するデータ集合体作成部とを備える。   An information processing system according to one embodiment of the present invention is an information processing system in which a first information processing apparatus and a second information processing apparatus are connected by a communication network, and the first information processing apparatus is one piece included in a data aggregate. A first array creating unit for storing data stored in the members in one or more elements of the array in accordance with a predetermined correspondence; and data and data stored in the one or more elements of the array A character string creating unit that creates a character string that includes a delimiter that indicates a delimiter; and an output unit that outputs a character string created by the character string creating unit, wherein the second information processing apparatus includes the data aggregate An acquisition unit that shares the correspondence relationship between the one or more members and the one or more elements of the array with the first information processing apparatus, and acquires the character string output by the output unit; and the acquisition Characters obtained in the department Is converted into zero or more data based on the delimiter, and the second array creation unit stores one or more data in one or more elements of the array, and the data stored in the one or more elements of the array Is stored in one or more members included in the data aggregate according to the correspondence relationship.

本発明の一側面によれば、構造体等のデータ集合体に係るデータを転送することが可能となる。   According to one aspect of the present invention, data related to a data aggregate such as a structure can be transferred.

情報処理装置を示すブロック図である。It is a block diagram which shows an information processing apparatus. 実施の形態1に係る情報処理装置が配列変換を実行する処理の手順を示したフローチャートである。4 is a flowchart illustrating a procedure of processing in which the information processing apparatus according to Embodiment 1 performs array conversion. 実施の形態2に係る情報処理装置が連想配列の配列変換を行う処理の手順を示したフローチャートである。10 is a flowchart illustrating a procedure of processing in which the information processing apparatus according to Embodiment 2 performs array conversion of an associative array. 実施の形態3における情報処理装置が行う変換処理の例を説明するための説明図である。10 is an explanatory diagram for describing an example of a conversion process performed by an information processing device according to Embodiment 3. FIG. 実施の形態3におけるデータ集合体の各メンバと配列の各要素との対応関係の例を示す図表である。14 is a chart showing an example of a correspondence relationship between each member of a data aggregate and each element of an array in the third embodiment. 実施の形態3に係る情報処理装置が行うテキスト変換の処理の手順を示したフローチャートである。14 is a flowchart illustrating a procedure of text conversion processing performed by the information processing apparatus according to the third embodiment. 実施の形態4における情報処理装置が行うデータ集合体を文字列へ変換する処理の例を説明するための説明図である。FIG. 20 is an explanatory diagram for explaining an example of processing for converting a data aggregate performed by the information processing apparatus according to Embodiment 4 into a character string; 実施の形態4におけるデータ集合体の各メンバと配列の各要素との対応関係の例を示す図表である。15 is a chart showing an example of a correspondence relationship between each member of a data aggregate and each element of an array in the fourth embodiment. 実施の形態4における情報処理装置が行う文字列をデータ集合体へ変換する処理の例を説明するための説明図である。FIG. 20 is an explanatory diagram for explaining an example of processing for converting a character string performed by an information processing apparatus according to Embodiment 4 into a data aggregate; 実施の形態4に係る情報処理装置が行うテキスト変換の処理の手順を示したフローチャートである。15 is a flowchart illustrating a procedure of text conversion performed by the information processing apparatus according to the fourth embodiment. 実施の形態7に係る情報処理システムの構成を示すブロック図である。FIG. 10 is a block diagram illustrating a configuration of an information processing system according to a seventh embodiment. 実施の形態7に係る情報処理システムが実行する処理の手順を示すフローチャートである。18 is a flowchart illustrating a procedure of processing executed by the information processing system according to the seventh embodiment. 実施の形態8に係る情報処理システムの構成を示すブロック図である。FIG. 20 is a block diagram illustrating a configuration of an information processing system according to an eighth embodiment. 実施の形態8に係る情報処理装置が実行する処理の手順を示すフローチャートである。25 is a flowchart illustrating a procedure of processing executed by the information processing apparatus according to the eighth embodiment. 実施の形態8に係る第2情報処理装置2が実行する処理の手順を示すフローチャートである。25 is a flowchart illustrating a procedure of processing executed by the second information processing apparatus 2 according to Embodiment 8. 外部からアクセスできないメンバを持つデータ集合体4に対する処理の概念を示す概念図である。It is a conceptual diagram which shows the concept of the process with respect to the data aggregate 4 with the member which cannot be accessed from the outside.

<実施の形態1>
以下本実施の形態を、図面を参照して説明する。図1は情報処理装置を示すブロック図である。情報処理装置1はインターネット、LAN(Local Area Network)又は携帯電話網等の通信網Nにより他の情報処理装置と相互に接続されている。情報処理装置1は、例えばサーバ装置、パーソナルコンピュータ又はスマートフォン等である。情報処理装置1は、CPU(Central Processing Unit)11、記憶部12、RAM(Random Access Memory)13、入力部14、表示部15、通信部16及びドライブ部17を備える。
<Embodiment 1>
Hereinafter, the present embodiment will be described with reference to the drawings. FIG. 1 is a block diagram illustrating an information processing apparatus. The information processing apparatus 1 is connected to other information processing apparatuses by a communication network N such as the Internet, a LAN (Local Area Network), or a mobile phone network. The information processing device 1 is, for example, a server device, a personal computer, a smartphone, or the like. The information processing apparatus 1 includes a CPU (Central Processing Unit) 11, a storage unit 12, a RAM (Random Access Memory) 13, an input unit 14, a display unit 15, a communication unit 16, and a drive unit 17.

CPU11は、バスを介してハードウェア各部と接続されている。CPU11は例えば一もしくは複数のCPU又はマルチコアCPU等を備える。CPU11は、記憶部12に記憶されたプログラム12Pに従いハードウェアの各部を制御する。   The CPU 11 is connected to each part of hardware via a bus. The CPU 11 includes, for example, one or a plurality of CPUs or a multi-core CPU. The CPU 11 controls each part of the hardware according to the program 12P stored in the storage unit 12.

記憶部12は例えばハードディスク又は大容量メモリ等である。ドライブ部17は、光ディスク等の記録媒体10から情報を読み取る。記憶部12にはCPU11が処理を行う際に必要とする種々のデータ及びプログラム12Pを格納する。CPU11は、記録媒体10に記録されたプログラム12Pをドライブ部17に読み取らせ、読み取ったプログラム12Pを記憶部12に記憶させる。CPU11は、必要に応じてプログラム12Pを記憶部12からRAM13へロードし、ロードしたプログラム12Pに従って、各種の処理を実行する。なお、プログラム12Pは、情報処理装置1の外部からダウンロードされてもよく、予め記憶部12に記憶されていてもよい。この場合、情報処理装置1は、ドライブ部17を備えていない形態であってもよい。   The storage unit 12 is, for example, a hard disk or a large capacity memory. The drive unit 17 reads information from the recording medium 10 such as an optical disk. The storage unit 12 stores various data and programs 12P required when the CPU 11 performs processing. The CPU 11 causes the drive unit 17 to read the program 12P recorded on the recording medium 10, and stores the read program 12P in the storage unit 12. The CPU 11 loads the program 12P from the storage unit 12 to the RAM 13 as necessary, and executes various processes according to the loaded program 12P. Note that the program 12P may be downloaded from the outside of the information processing apparatus 1 or may be stored in the storage unit 12 in advance. In this case, the information processing apparatus 1 may not include the drive unit 17.

RAM13は例えばSRAM(Static Random Access Memory)、DRAM(Dynamic Random Access Memory)、フラッシュメモリ等である。RAM13は、記憶部としても機能し、CPU11による各種プログラムの実行時に発生する種々のデータを一時的に記憶する。   The RAM 13 is, for example, an SRAM (Static Random Access Memory), a DRAM (Dynamic Random Access Memory), a flash memory, or the like. The RAM 13 also functions as a storage unit, and temporarily stores various data generated when the CPU 11 executes various programs.

入力部14はマウス又はキーボード等の入力デバイスであり、受け付けた操作情報をCPU11へ送信する。表示部15はCPU11から送信された画像データを表示する。表示部15は例えば液晶ディスプレイである。通信部16は、例えば無線LANカード又は携帯電話用通信モジュール等であり、通信網Nを介して各種情報を送受信する。   The input unit 14 is an input device such as a mouse or a keyboard, and transmits received operation information to the CPU 11. The display unit 15 displays the image data transmitted from the CPU 11. The display unit 15 is a liquid crystal display, for example. The communication unit 16 is, for example, a wireless LAN card or a mobile phone communication module, and transmits / receives various information via the communication network N.

実施の形態1では、情報処理装置1は、配列を文字列へ変換し、また文字列を配列へ変換する。配列を文字列へ変換する方法を説明する。johoA という要素数が3である配列があり、johoA の要素をjohoA(0)、johoA(1)及びjohoA(2)とする。johoA(0)に”あああ”、johoA(1)に”いいい”、johoA(2)に”ううう”が代入されているとする。配列のいずれの要素にも存在しない文字(例えば「;」)を区切り文字とし、区切り文字を境にして配列の全ての要素を連結し、区切り文字が何であるかを示すために、所定の位置(例えば1文字目)に区切り文字を付記して、文字列を作成する。より具体的には、CPU11は、配列の各要素に格納されているデータを、要素の順に、各要素のデータの区切りを示す区切り文字を付加しながら連結し、所定の位置に区切り文字を付記することにより、文字列を作成する。文字列の作成により、配列が文字列へ変換される。配列johoA は、「;あああ;いいい;ううう」という文字列に変換される。値が代入されていない配列を文字列へ変換しようとした場合は、情報処理装置1は、配列を要素数ゼロの配列とみなして処理を行う。例えば、VB.netで用いられるnothingを文字列へ変換しようとした場合は、情報処理装置1は、nothingを要素数ゼロの配列とみなして処理を行う。   In the first embodiment, the information processing apparatus 1 converts an array into a character string and converts a character string into an array. A method for converting an array into a character string will be described. There is an array called johoA with three elements, and the elements of johoA are johoA (0), johoA (1), and johoA (2). Suppose joaA (0) is assigned “Oh”, johoA (1) is assigned “no”, and johoA (2) is assigned “Uu”. A character that does not exist in any element of the array (eg ";") is used as a delimiter, and all elements of the array are concatenated with the delimiter as a boundary to indicate what the delimiter is A delimiter is added to (for example, the first character) to create a character string. More specifically, the CPU 11 concatenates the data stored in each element of the array in the order of the elements while adding a delimiter character indicating the data delimiter of each element, and adds the delimiter character at a predetermined position. To create a character string. By creating a string, the array is converted to a string. The array johoA is converted to a character string “; When an attempt is made to convert an array to which no value is assigned into a character string, the information processing apparatus 1 performs processing by regarding the array as an array having zero elements. For example, VB. When trying to convert nothing used in the net into a character string, the information processing apparatus 1 performs processing by regarding nothing as an array having zero elements.

なお、本実施形態では区切り文字を「;」としたが、これに限られない。例えば、配列のいずれかの要素に「;」が存在した場合、いずれの要素にも存在しない文字、例えば「…」を区切り文字として付加してもよい。なお、本実施形態では区切り文字は文字列を区切る文字としたが、数字等であってもよい。また本実施形態では文字列の先頭に区切り文字を付加したが、区切り文字の位置はこれに限られない。例えば、区切り文字は文字列の後ろに付加してもよい。また、区切りを示すために二個以上の区切り文字が用いられてもよい。   In the present embodiment, the delimiter is “;”, but is not limited thereto. For example, when “;” exists in any element of the array, a character that does not exist in any element, for example, “...” May be added as a delimiter. In this embodiment, the delimiter is a character that delimits a character string, but may be a number or the like. In this embodiment, a delimiter is added to the beginning of the character string, but the position of the delimiter is not limited to this. For example, the delimiter may be added after the character string. Also, two or more delimiters may be used to indicate a delimiter.

次に、文字列を配列へ変換する方法を説明する。文字列の予め定められている所定の位置(例えば1文字目)を区切り文字とみなし、それ以外の文字列は区切り文字によって区切られた文字列とみなす。また、取得した文字列に含まれている順番に、区切り文字によって区切られた文字列を、配列の各要素に格納する。このようにして、文字列は配列の各要素に格納されたデータへ変換される。すなわち、文字列は配列へ変換される。例えば、「たほげほげたぬるぬるたうにうに」という文字列では、1文字目が「た」であるので、「た」が区切り文字であるとみなされる。1文字目の区切り文字を取り除いた文字列「ほげほげたぬるぬるたうにうに」が得られる。この文字列が区切り文字を境にして分割され、johoA(0)=”ほげほげ”、johoA(1)=”ぬるぬる”及びjohoA(2)=”うにうに”という要素を含んだ要素数3の配列johoA が得られる。文字列が空文字列である場合は、情報処理装置1は、文字列を要素数ゼロの配列へ変換する。   Next, a method for converting a character string into an array will be described. A predetermined position (for example, the first character) of the character string is regarded as a delimiter, and other character strings are regarded as character strings delimited by the delimiter. In addition, the character strings delimited by delimiters in the order included in the acquired character string are stored in each element of the array. In this way, the character string is converted into data stored in each element of the array. That is, the character string is converted into an array. For example, in the character string “Tahoge-Huge-Turuku-Urununii”, the first character is “Ta”, so “Ta” is regarded as a delimiter. The character string “Hokehoge Nuru Nuni-uni” obtained by removing the first delimiter is obtained. This string is divided with the delimiter as the boundary, and the number of elements is 3 including the elements johoA (0) = ”Hugehoge”, johoA (1) = “slimy” and johoA (2) = “unimo” The array johoA is obtained. If the character string is an empty character string, the information processing apparatus 1 converts the character string into an array having zero elements.

以後、実施の形態1に示した処理を「配列変換」と呼称する。情報処理装置1は、配列変換を行うためのルーチン(返り値はboolean型)を作成し、該ルーチンの引数を3つ設ける。引数は、配列を文字列へ変換するのかそれとも逆かを指定する値渡しのboolean型変数(toarr)、参照渡しのstring型の配列(arr)、及び参照渡しのstring型(text)である。2つ目の引数は、参照渡しのstring型の配列(arr)である。3つ目の引数は、参照渡しのstring(text)型である。ルーチンは、VB.net等で用いられるプロシージャ、又はC言語等で用いられる関数である。toarrがTRUEの場合はtextを配列変換して作成された配列(textが空文字列の場合は要素数ゼロの配列)がarrに代入され、toarrがFALSEの場合はarrを配列変換して作成された文字列(arrに値が代入されていない場合は空文字列)がtextに代入される。いずれの場合も、成功したら返り値はTRUE、失敗したら返り値はFALSEとなる。ただし、配列が文字列型ではない場合があることを考慮し、配列のデータ型に合わせたルーチンを設けること、又は作成された配列を適切なデータ型に変更するルーチンを別途作成することも可能である。   Hereinafter, the process shown in the first embodiment is referred to as “array conversion”. The information processing apparatus 1 creates a routine for performing array conversion (return value is a boolean type), and provides three arguments for the routine. The argument is a boolean variable (toarr) passed by value that specifies whether the array is converted to a character string or vice versa, a string array (arr) passed by reference, and a string type (text) passed by reference. The second argument is a string array (arr) passed by reference. The third argument is a string (text) type passed by reference. The routine is VB. It is a procedure used in net or the like, or a function used in C language or the like. If toarr is TRUE, an array created by converting text to an array (an array with zero elements if text is an empty string) is assigned to arr. If toarr is FALSE, an array is created by converting array The character string (empty character string if no value is assigned to arr) is assigned to text. In either case, the return value is TRUE if it succeeds, and the return value is FALSE if it fails. However, considering that the array may not be a character string type, it is possible to provide a routine that matches the data type of the array, or to create a separate routine that changes the created array to an appropriate data type It is.

図2は、実施の形態1に係る情報処理装置が配列変換を実行する処理の手順を示したフローチャートである。図2に示す処理の手順は、配列変換を行うためのルーチンによりCPU11が行う処理の一例である。情報処理装置1のCPU11は、プログラム12Pに基づいて以下の処理を実行する。CPU11は、引数に基づいて、配列を文字列へ変換するのかそれとも逆かを判定する(ステップS11)。配列を文字列へ変換する場合(ステップS11:YES)、CPU11は、RAM13又は記憶部12に記憶している配列のいずれの要素にも存在しない文字を区切り文字とすることにより、区切り文字を特定する(ステップS12)。CPU11は、配列の各要素に代入されている各データを読み出し、区切り文字を境にしてデータを連結する(ステップS13)。CPU11は、次に、区切り文字を境にして連結されたデータを含み、所定の位置に区切り文字を含んだ文字列を作成する(ステップS14)。CPU11は、作成した文字列をRAM13又は記憶部12に記憶し、処理を終了する。   FIG. 2 is a flowchart illustrating a procedure of processing in which the information processing apparatus according to Embodiment 1 performs array conversion. The procedure of the process shown in FIG. 2 is an example of the process performed by the CPU 11 by a routine for performing array conversion. The CPU 11 of the information processing device 1 executes the following processing based on the program 12P. Based on the argument, the CPU 11 determines whether to convert the array into a character string or vice versa (step S11). When converting an array into a character string (step S11: YES), the CPU 11 specifies a delimiter by using a character that does not exist in any element of the array stored in the RAM 13 or the storage unit 12 as a delimiter. (Step S12). The CPU 11 reads each data assigned to each element of the array and concatenates the data with the delimiter as a boundary (step S13). Next, the CPU 11 creates a character string including the data concatenated with the delimiter as a boundary and including the delimiter at a predetermined position (step S14). CPU11 memorize | stores the produced character string in RAM13 or the memory | storage part 12, and complete | finishes a process.

図2のステップS11で、文字列を配列へ変換する場合は(ステップS11:NO)、CPU11は、RAM13又は記憶部12に記憶している文字列の所定の位置に含まれている文字を区切り文字とみなすことにより、区切り文字を特定する(ステップS15)。CPU11は、区切り文字で区切られたデータを文字列から抽出することにより、文字列を0個以上のデータへ変換する(ステップS16)。CPU11は、データの数と同数の要素を有する配列を作成し、配列の各要素に各データを代入する(S17)。CPU11は、作成した配列をRAM13又は記憶部12に記憶し、処理を終了する。   When converting a character string into an array in step S11 of FIG. 2 (step S11: NO), the CPU 11 delimits characters included in a predetermined position of the character string stored in the RAM 13 or the storage unit 12. By considering it as a character, a delimiter is specified (step S15). The CPU 11 converts the character string into zero or more data by extracting data delimited by the delimiter from the character string (step S16). The CPU 11 creates an array having the same number of elements as the number of data, and assigns each data to each element of the array (S17). CPU11 memorize | stores the produced arrangement | sequence in RAM13 or the memory | storage part 12, and complete | finishes a process.

<実施の形態2>
実施の形態2では、情報処理装置1は、連想配列を文字列へ変換し、また文字列を連想配列へ変換する。本実施の形態に係る情報処理装置1の構成は、実施の形態1と同様である。
<Embodiment 2>
In the second embodiment, the information processing apparatus 1 converts an associative array into a character string and converts a character string into an associative array. The configuration of the information processing apparatus 1 according to the present embodiment is the same as that of the first embodiment.

連想配列を文字列へ変換する方法を説明する。連想配列の全てのキーを取り出し、各キーを各要素に代入した第1の配列johoAを作成する。同数の要素数を持つ第2の配列johoBを作成し、配列johoAの各要素に代入された文字列をキーとして連想配列から得られる文字列を、配列johoAの各要素に対応する配列johoBの各要素に代入する。その後、配列johoA及び配列johoBを配列変換し、要素数が2である第3の配列johoCを作成する。また、配列johoAを配列変換した文字列を配列johoCの最初の要素に代入し、配列johoBを配列変換した文字列を配列johoCの次の順番の要素に代入する。そして、配列johoCを配列変換する。値が代入されていない連想配列を文字列へ変換しようとした場合は、情報処理装置1は、連想配列を要素数ゼロの連想配列とみなして処理を行う。例えば、VB.netで用いられるNothingを文字列へ変換しようとした場合は、情報処理装置1は、Nothingを要素数ゼロの連想配列とみなして処理を行う。   A method for converting an associative array into a character string will be described. All keys of the associative array are extracted, and a first array johoA is created in which each key is assigned to each element. Create a second array johoB with the same number of elements, and use the string assigned to each element of the array johoA as a key to obtain the character string obtained from the associative array for each element of the array johoB corresponding to each element of the array johoA Assign to an element. Thereafter, the array johoA and the array johoB are array-converted to create a third array johoC having two elements. Also, the character string obtained by converting the array johoA is assigned to the first element of the array johoC, and the character string obtained by converting the array johoB is assigned to the next element in the array johoC. Then, the array johoC is converted. When attempting to convert an associative array to which no value is assigned to a character string, the information processing apparatus 1 performs processing by regarding the associative array as an associative array having zero elements. For example, VB. When converting Nothing used in the net into a character string, the information processing apparatus 1 performs processing by regarding Nothing as an associative array with zero elements.

例えば、連想配列のキーが「ど」「は」「あ」「お」「も」であり、値が夫々「まる」「ぎん」「とう」「はん」「ゆう」であるとする。配列johoAは、johoA(0)=”ど”、johoA(1)=”は”、johoA(2)=”あ”、johoA(3)=”お”、及びjohoA(4)=”も”という要素を含んだ要素数5の配列である。配列johoBでは、各キーが格納された配列johoAの各要素と同一の番号の要素に、連想配列の値が格納される。「ど」をキーとする場合は値が「まる」であるため、johoB(0)=”まる”となり、以後同様にjohoB(1)=”ぎん”、johoB(2)=”とう”、johoB(3)=”はん”、johoB(4)=”ゆう”となる。配列johoA及び配列johoBを配列変換すると、夫々「;ど;は;あ;お;も」、「;まる;ぎん;とう;はん;ゆう」となる。夫々の文字列が配列johoCの各要素に格納される。johoC(0)=”;ど;は;あ;お;も”、johoC(1)=”;まる;ぎん;とう;はん;ゆう”となる。johoCを配列変換し、「#;ど;は;あ;お;も#;まる;ぎん;とう;はん;ゆう」が得られる。   For example, it is assumed that the keys of the associative array are “DO”, “HA”, “A”, “O”, “MO”, and the values are “MARU”, “GIN”, “TOU”, “HAN”, “YU”, respectively. The array johoA is johoA (0) = ”do”, johoA (1) = ”is”, johoA (2) = ”a”, johoA (3) = “o”, and johoA (4) = ”also” It is an array of 5 elements including elements. In the array johoB, the value of the associative array is stored in the element having the same number as each element of the array johoA in which each key is stored. When “DO” is used as a key, the value is “maru”, so johoB (0) = ”maru”, and similarly, johoB (1) = “Gin”, johoB (2) = ”to”, johoB (3) = ”han” and johoB (4) = “Yu”. When the array johoA and the array johoB are sequence-converted, they become “; do; ha; a; o; mo” and “; maru; gin; to; han; yu”, respectively. Each character string is stored in each element of the array johoC. johoC (0) = ”; do; ha; a; o; mo”, johoC (1) = ”; maru; gin; to; han; yu”. transpose johoC and get “#; do; ha; a; o; also #; maru; gin; to; han; yu”.

文字列を連想配列へ変換する方法を説明する。文字列を配列変換することにより、第4の配列johoCを作成する。配列johoCの各要素に代入されている文字列を配列変換する。すなわち、配列johoCの最初の要素に代入されている文字列を配列変換した第5の配列johoAを作成し、配列johoCの次の順番の要素に代入されている文字列を配列変換した第6の配列johoBを作成する。配列johoAの各要素に代入されているデータをキー、配列johoAの各要素に対応する配列johoBの各要素に代入されているデータを値として、各データを連想配列に代入することにより、連想配列を作成する。文字列が空文字列である場合は、情報処理装置1は、文字列を要素数ゼロの配列へ変換する。   A method for converting a character string into an associative array will be described. A fourth array johoC is created by array conversion of the character string. Array conversion of character strings assigned to each element of array johoC. That is, a fifth array johoA in which the character string assigned to the first element of the array johoC is array-converted is created, and the character string assigned to the element in the next order of the array johoC is converted to the sixth array Create array johoB. Associative array by assigning each data to an associative array with the data assigned to each element of array johoA as a key and the data assigned to each element of array johoB corresponding to each element of array johoA as a value Create If the character string is an empty character string, the information processing apparatus 1 converts the character string into an array having zero elements.

例えば、文字列が「#;赤;橙;青;紫;黄#;Sr;Na;;K;Ba」であるとする。この文字列を配列変換することにより、johoC(0)=” ;赤;橙;青;紫;黄”、johoC(1)=”;Sr;Na;;K;Ba”という要素を含んだ要素数2の配列johoCが作成される。配列johoCのjohoC(0)に格納された文字列を配列変換して配列johoAが作成され、johoC(1)に格納された文字列を配列変換して配列johoBが作成される。johoAは、johoA(0)=”赤”、johoA(1)=”橙”、johoA(2)=”青”、johoA(3)=”紫”、及びjohoA(4)=”黄”という要素を含む。johoBは、johoB(0)=”Sr”、johoB(1)=”Na”、johoB(2)=””(空文字列)、johoB(3)=”K”、及びjohoB(4)=”Ba”という要素を含む。johoAの各要素に格納されたデータをキー、キーが格納されたjohoAの要素と同番号のjohoBの要素に格納されたデータを値として、連想配列が作成される。   For example, it is assumed that the character string is “#; red; orange; blue; purple; yellow #; Sr; Na ;; K; Ba”. By converting this string, elements containing johoC (0) = ”; red; orange; blue; purple; yellow”, johoC (1) = ”; Sr; Na ;; K; Ba” The array johoC of Equation 2 is created. The array johoA is created by array conversion of the character string stored in johoC (0) of the array johoC, and the array johoB is created by array conversion of the character string stored in johoC (1). johoA is an element of johoA (0) = “red”, johoA (1) = “orange”, johoA (2) = “blue”, johoA (3) = “purple”, and johoA (4) = “yellow” including. johoB includes johoB (0) = “Sr”, johoB (1) = “Na”, johoB (2) = ”” (empty string), johoB (3) = “K”, and johoB (4) = ”Ba ”Element. An associative array is created using the data stored in each element of johoA as a key and the data stored in the element of johoB having the same number as the element of johoA storing the key as values.

以後、「連想配列を配列変換」又は「連想配列に配列変換」と称した場合、実施の形態2に示した処理を指すものとする。また、情報処理装置1は、連想配列を配列変換するためのルーチン(返り値はboolean型)を作成し、該ルーチンの引数を3つ設ける。引数は、配列を文字列へ変換するのかそれとも逆かを指定する値渡しのboolean型(toobj)、参照渡しの連想配列(obj)、及び参照渡しのstring型(text)である。toobjがTRUEの場合は、textを連想配列に配列変換して作成された連想配列(textが空文字列の場合は要素数ゼロの連想配列)がobjに代入される。toobjがFALSEの場合は、連想配列を配列変換することによりobjから作成された文字列(objに値が代入されていない場合は空文字列)がtextに代入される。いずれの場合も、成功したら返り値はTRUE、失敗したら返り値はFALSEとなる。ただし、連想配列のキー及び値のいずれかが文字列型ではない場合があることを考慮し、連想配列のキー若しくは値のデータ型に合わせたルーチンを設けること、又は作成された値を適切なデータ型に変更するルーチンを別途作成することも可能である。   Hereinafter, when “associative array is converted to array” or “array conversion to associative array” is referred to, the processing shown in the second embodiment is assumed. Further, the information processing apparatus 1 creates a routine (return value is a boolean type) for array conversion of the associative array, and provides three arguments for the routine. The argument is a boolean type (toobj) passed by value that specifies whether the array is converted to a character string or vice versa, an associative array passed by reference (obj), and a string type (text) passed by reference. If toobj is TRUE, an associative array created by converting text to an associative array (an associative array with zero elements if text is an empty string) is assigned to obj. When toobj is FALSE, a character string created from obj by array conversion of an associative array (or an empty string if no value is assigned to obj) is assigned to text. In either case, the return value is TRUE if it succeeds, and the return value is FALSE if it fails. However, considering that either the key or value of the associative array may not be a string type, provide a routine that matches the data type of the key or value of the associative array, or set the created value appropriately. It is also possible to create a separate routine for changing to a data type.

図3は、実施の形態2に係る情報処理装置が連想配列の配列変換を行う処理の手順を示したフローチャートである。図3に示す処理の手順は、連想配列の配列変換を行うためのルーチンによりCPU11が行う処理の一例である。情報処理装置1のCPU11は、プログラム12Pに基づいて以下の処理を実行する。CPU11は、引数に基づいて、連想配列を文字列へ変換するのかそれとも逆かを判定する(ステップS21)。連想配列を文字列へ変換する場合(ステップS21:YES)、CPU11は、RAM13又は記憶部12に記憶している連想配列の各キーを各要素に代入した第1の配列を作成する(ステップS22)。CPU11は、第1の配列の各要素に代入された文字列をキーとして連想配列から得られる値を各要素に代入した第2の配列を作成する(ステップS23)。CPU11は、第1の配列及び第2の配列を配列変換し(ステップS24)、第1の配列及び第2の配列を配列変換した文字列を各要素に代入した第3の配列を作成する(ステップS25)。CPU11は、次に、第3の配列を配列変換する(ステップS26)。CPU11は、ステップS26により作成した文字列をRAM13又は記憶部12に記憶し、処理を終了する。   FIG. 3 is a flowchart illustrating a processing procedure in which the information processing apparatus according to the second embodiment performs array conversion of an associative array. The procedure of the process shown in FIG. 3 is an example of a process performed by the CPU 11 by a routine for performing an array conversion of an associative array. The CPU 11 of the information processing device 1 executes the following processing based on the program 12P. Based on the argument, the CPU 11 determines whether to convert the associative array into a character string or vice versa (step S21). When converting the associative array into a character string (step S21: YES), the CPU 11 creates a first array in which each key of the associative array stored in the RAM 13 or the storage unit 12 is substituted for each element (step S22). ). The CPU 11 creates a second array in which a value obtained from the associative array is substituted for each element using the character string assigned to each element of the first array as a key (step S23). The CPU 11 performs array conversion on the first array and the second array (step S24), and creates a third array in which the character string obtained by array conversion of the first array and the second array is assigned to each element ( Step S25). Next, the CPU 11 converts the arrangement of the third array (step S26). CPU11 memorize | stores the character string produced by step S26 in RAM13 or the memory | storage part 12, and complete | finishes a process.

ステップS21で、文字列を連想配列へ変換する場合は(ステップS21:NO)、CPU11は、RAM13又は記憶部12に記憶している文字列を配列変換することにより、第4の配列を作成する(ステップS28)。CPU11は、第4の配列の各要素を配列変換することにより、各要素に代入されている文字列を配列変換した第5の配列及び第6の配列を作成する(ステップS28)。CPU11は、第5の配列の各要素に代入されているデータをキー、第6の配列の各要素に代入されているデータを値として、連想配列を作成する(ステップS29)。CPU11は、作成した連想配列をRAM13又は記憶部12に記憶し、処理を終了する。   When converting a character string into an associative array in step S21 (step S21: NO), the CPU 11 creates a fourth array by array-converting the character string stored in the RAM 13 or the storage unit 12. (Step S28). The CPU 11 performs array conversion on each element of the fourth array, thereby creating a fifth array and a sixth array in which the character strings assigned to the elements are array-converted (step S28). The CPU 11 creates an associative array using the data assigned to each element of the fifth array as a key and the data assigned to each element of the sixth array as a value (step S29). CPU11 memorize | stores the produced associative arrangement | sequence in RAM13 or the memory | storage part 12, and complete | finishes a process.

<実施の形態3>
実施の形態3では、情報処理装置1は、構造体等のデータ集合体をメンバとして含んでいないデータ集合体を文字列へ変換し、また文字列をデータ集合体へ変換する。本実施の形態に係る情報処理装置1の構成は、実施の形態1と同様である。以後、データ集合体を文字列へ変換する処理及び文字列をデータ集合体へ変換する処理を「テキスト変換」と呼称する。
<Embodiment 3>
In Embodiment 3, the information processing apparatus 1 converts a data aggregate that does not include a data aggregate such as a structure as a member into a character string, and converts the character string into a data aggregate. The configuration of the information processing apparatus 1 according to the present embodiment is the same as that of the first embodiment. Hereinafter, the process of converting a data aggregate into a character string and the process of converting a character string into a data aggregate are referred to as “text conversion”.

図4は、実施の形態3における情報処理装置1が行う変換処理の例を説明するための説明図である。図4中にAで示した部分はデータ集合体を文字列へ変換する処理の例を説明する。図4中にBで示した部分は文字列をデータ集合体へ変換する処理の例を説明する。   FIG. 4 is an explanatory diagram for explaining an example of conversion processing performed by the information processing apparatus 1 according to the third embodiment. The portion indicated by A in FIG. 4 describes an example of processing for converting a data aggregate into a character string. The portion indicated by B in FIG. 4 describes an example of processing for converting a character string into a data aggregate.

データ集合体を文字列へ変換する方法を説明する。図4のAに示すように第1情報処理装置1は構造体等のデータ集合体31を配列32を介して文字列35へ変換する。ただし、どの型のデータ集合体から生成された文字列であるかを示す識別文字列を文字列に付加することもでき、この場合は識別文字列を付加した文字列を作成する。データ集合体31は、food型の変数foodとして宣言されているとする。データ集合体31には、name及びkindという二個のメンバが含まれており、name及びkindはString型の変数であるとする。データ集合体31のメンバfood.name及びfood.kindには、「ステーキ」及び「主食」という文字列のデータが格納されているとする。   A method for converting a data aggregate into a character string will be described. As shown in FIG. 4A, the first information processing apparatus 1 converts a data aggregate 31 such as a structure into a character string 35 via an array 32. However, an identification character string indicating which type of data aggregate is generated can be added to the character string. In this case, a character string with the identification character string added is created. It is assumed that the data aggregate 31 is declared as a food type variable food. The data aggregate 31 includes two members, name and kind, and name and kind are variables of String type. It is assumed that character strings “steak” and “main food” are stored in members food.name and food.kind of the data aggregate 31.

第1情報処理装置1は、データ集合体31の各メンバに代入されているデータを、各メンバに対応する配列32の各要素に代入することにより、配列32を作成する。定数ARR_NAME=0、ARR_KIND=1が定義され、配列32は、johoAという配列であり、String型のjohoA(ARR_NAME)及びjohoA(ARR_KIND)という要素を含んでいるとする。データ集合体31の各メンバと配列32の各要素との対応関係が予め定められている。例えば、データ集合体331の各メンバが配列32の各要素に対応する順番が定められている。   The first information processing apparatus 1 creates the array 32 by assigning the data assigned to each member of the data aggregate 31 to each element of the array 32 corresponding to each member. Constants ARR_NAME = 0 and ARR_KIND = 1 are defined, and the array 32 is an array called johoA and includes elements of String type johoA (ARR_NAME) and johoA (ARR_KIND). Correspondence between each member of the data aggregate 31 and each element of the array 32 is predetermined. For example, the order in which each member of the data aggregate 331 corresponds to each element of the array 32 is determined.

図5は、実施の形態3におけるデータ集合体31の各メンバと配列32の各要素との対応関係の例を示す図表である。図5に示す如き対応関係はプログラム12Pに記載されている。CPU11はプログラム12Pを参照することで対応関係を読み込む。なお、図5に示す如き対応関係はプログラム12Pとは別に記憶部12に記憶されていてもよい。図5に示す例では、food.nameに対応する配列32のインデックスは0とし、food.kindに対応する配列32のインデックスは1とする。すなわち、food.nameとjohoA(0)とが対応し、food.kindとjohoA(1)とが対応する。johoA(0)=”ステーキ”となり、johoA(1)=”主食”となる。   FIG. 5 is a chart showing an example of the correspondence between each member of the data aggregate 31 and each element of the array 32 in the third embodiment. The correspondence as shown in FIG. 5 is described in the program 12P. The CPU 11 reads the correspondence relationship by referring to the program 12P. Note that the correspondence as shown in FIG. 5 may be stored in the storage unit 12 separately from the program 12P. In the example shown in FIG. 5, the index of the array 32 corresponding to food.name is 0, and the index of the array 32 corresponding to food.kind is 1. That is, food.name and johoA (0) correspond, and food.kind and johoA (1) correspond. johoA (0) = “steak” and johoA (1) = “staple food”.

第1情報処理装置1は、配列32を配列変換することにより、文字列35を作成する。本例では、johoA(0)及びjohoA(1)に代入されている「ステーキ」及び「主食」という文字列331及び332が、区切り文字「;」を境にして連結され、1文字目に区切り文字が付加された文字列35が作成される。本例では、文字列35は「;ステーキ;主食」である。また、文字列35は、food型から生成された文字列であることを示す文字列が付加されていてもよい。例えば、「foodclass:」が付加される場合は、「foodclass:;ステーキ;主食」という文字列35が得られる。データ集合体に値が代入されていない場合は、情報処理装置1は、データ集合体を各メンバにデフォルト値が代入された(値が代入されていない状態がデフォルトの場合はその状態)データ集合体とみなして処理を行うこともできる。   The first information processing apparatus 1 creates a character string 35 by converting the array 32. In this example, the character strings 331 and 332 “steak” and “main food” assigned to johoA (0) and johoA (1) are concatenated with the delimiter “;” as the boundary, and the first character is delimited. A character string 35 to which characters are added is created. In this example, the character string 35 is “; steak; staple food”. The character string 35 may be added with a character string indicating that the character string is a character string generated from the food type. For example, when “foodclass:” is added, the character string 35 “foodclass :; steak; staple food” is obtained. When no value is assigned to the data aggregate, the information processing apparatus 1 assigns a default value to each member of the data aggregate (if the value is not assigned to the default state, the data aggregate) It can also be treated as a body.

文字列をデータ集合体へ変換する方法を説明する。文字列にfood型から生成された文字列であることを示す識別文字列が付加される場合は、情報処理装置1は、food型を示す識別文字列が文字列中の所定の位置に存在するか否かを判定する。識別文字列が所定の位置に存在しない場合は、情報処理装置1は、取得した文字列はfood型から生成された文字列ではないと判定し、処理を中止する。識別文字列が所定の位置に存在する場合は、情報処理装置1は、識別文字列を取り除いた文字列を作成し、これをデータ集合体へ変換すべき文字列であるとみなす。   A method for converting a character string into a data aggregate will be described. When an identification character string indicating that the character string is generated from the food type is added to the character string, the information processing apparatus 1 has the identification character string indicating the food type at a predetermined position in the character string. It is determined whether or not. If the identification character string does not exist at the predetermined position, the information processing apparatus 1 determines that the acquired character string is not a character string generated from the food type, and stops the processing. When the identification character string exists at a predetermined position, the information processing apparatus 1 creates a character string from which the identification character string is removed, and regards this as a character string to be converted into a data aggregate.

図4のBに示すように、情報処理装置1は文字列36を配列38を介してデータ集合体39へ変換する。識別文字列を取り除いた後の文字列36は「;ステーキ;主食」である。情報処理装置1は、文字列36を配列変換することにより、配列38を作成する。本例では、johoA(0)及びjohoA(1)を要素とする配列johoAが作成され、文字列36から得られた「ステーキ」及び「主食」という文字列371及び372が、johoA(0)及びjohoA(1)に代入される。情報処理装置1は、データ集合体に含まれる各メンバと配列に含まれる各要素との予め定められている対応関係に従って、配列38の各要素に代入されているデータを、対応するデータ集合体39の各メンバに代入する。すなわち、johoA(0)に格納されている「ステーキ」というデータがfood.nameに代入され、johoA(1)に格納されている「主食」というデータがfood.kindに代入される。このようにして、文字列がデータ集合体へ変換される。   As shown in B of FIG. 4, the information processing apparatus 1 converts the character string 36 into a data aggregate 39 via an array 38. The character string 36 after removing the identification character string is “; steak; staple food”. The information processing apparatus 1 creates an array 38 by converting the character string 36. In this example, an array johoA having johoA (0) and johoA (1) as elements is created, and character strings 371 and 372 of “steak” and “main food” obtained from the character string 36 are converted to johoA (0) and Assigned to johoA (1). The information processing apparatus 1 uses the data assigned to each element of the array 38 in accordance with a predetermined correspondence between each member included in the data aggregate and each element included in the array. It substitutes for each member of 39. That is, the data “steak” stored in johoA (0) is assigned to food.name, and the data “main food” stored in johoA (1) is assigned to food.kind. In this way, the character string is converted into a data aggregate.

情報処理装置1は、データ集合体をテキスト変換するためのルーチン(返り値はboolean型)を作成し、該ルーチンの引数を3つ設ける。引数は、配列を文字列へ変換するのかそれとも逆かを指定する値渡しのboolean型変数(toobj)、参照渡しのデータ集合体(obj)、及び参照渡しのstring型(text)である。toobjがTRUEの場合はtextからテキスト変換により作成されたデータ集合体をobjに代入し、FALSEの場合はobjをテキスト変換して作成された文字列をtextに代入する。いずれの場合も、成功したら返り値はTRUE、失敗したら返り値はFALSEを返す。   The information processing apparatus 1 creates a routine (return value is a boolean type) for text-converting the data aggregate, and provides three arguments for the routine. The argument is a boolean variable (toobj) passed by value that specifies whether to convert the array into a character string or vice versa, a data aggregate (obj) passed by reference, and a string type (text) passed by reference. When toobj is TRUE, a data set created by text conversion from text is assigned to obj, and when it is FALSE, a character string created by text conversion of obj is assigned to text. In either case, the return value is TRUE if it succeeds, and the return value is FALSE if it fails.

図6は、実施の形態3に係る情報処理装置1が行うテキスト変換の処理の手順を示したフローチャートである。図6に示す処理の手順は、データ集合体をメンバとして含んでいないデータ集合体のテキスト変換を行うためのルーチンによりCPU11が行う処理の一例である。情報処理装置1のCPU11は、プログラム12Pに基づいて以下の処理を実行する。CPU11は、引数に基づいて、データ集合体を文字列へ変換するのかそれとも逆かを判定する(ステップS31)。データ集合体を文字列へ変換する場合(ステップS31:YES)、CPU11は、RAM13又は記憶部12に記憶しているデータ集合体の各メンバに格納されているデータを配列の各要素に代入することにより、データ集合体から配列を作成する(ステップS32)。ステップS32では、データ集合体の各メンバと配列の各要素との予め定められている対応関係に従って、各メンバに格納されているデータが対応する要素に代入される。CPU11は、次に、配列を配列変換することにより、文字列を作成する(ステップS33)。CPU21は、作成した文字列をRAM13又は記憶部12に記憶し、処理を終了する。   FIG. 6 is a flowchart illustrating a text conversion process performed by the information processing apparatus 1 according to the third embodiment. The procedure of the process shown in FIG. 6 is an example of the process performed by the CPU 11 by a routine for performing text conversion of a data aggregate that does not include the data aggregate as a member. The CPU 11 of the information processing device 1 executes the following processing based on the program 12P. Based on the argument, the CPU 11 determines whether to convert the data aggregate into a character string or vice versa (step S31). When converting the data aggregate into a character string (step S31: YES), the CPU 11 substitutes the data stored in each member of the data aggregate stored in the RAM 13 or the storage unit 12 for each element of the array. Thus, an array is created from the data aggregate (step S32). In step S32, the data stored in each member is assigned to the corresponding element according to a predetermined correspondence between each member of the data aggregate and each element of the array. Next, the CPU 11 creates a character string by converting the array (step S33). CPU21 memorize | stores the produced character string in RAM13 or the memory | storage part 12, and complete | finishes a process.

ステップS31で、文字列をデータ集合体へ変換する場合は(ステップS31:NO)、CPU11は、RAM13又は記憶部12に記憶している文字列を配列変換することにより、配列を作成する(ステップS34)。CPU11は、次に、配列の各要素に格納されているデータをデータ集合体の各メンバに代入することにより、配列からデータ集合体を作成する(ステップS35)。ステップS33では、配列の各要素とデータ集合体の各メンバとの予め定められている対応関係に従って、各要素に格納されているデータが対応するメンバに代入される。CPU11は、作成したデータ集合体をRAM13又は記憶部12に記憶し、処理を終了する。   In step S31, when converting a character string into a data aggregate (step S31: NO), the CPU 11 creates an array by converting the character string stored in the RAM 13 or the storage unit 12 (step S31). S34). Next, the CPU 11 creates a data aggregate from the array by substituting the data stored in each element of the array for each member of the data aggregate (step S35). In step S33, the data stored in each element is assigned to the corresponding member according to a predetermined correspondence between each element of the array and each member of the data aggregate. CPU11 memorize | stores the produced data aggregate in RAM13 or the memory | storage part 12, and complete | finishes a process.

本実施の形態によれば、情報処理装置1は、構造体等のデータ集合体を文字列へ変換することができ、また、文字列をデータ集合体へ変換することができる。これにより、一の情報処理装置で構造体等のデータ集合体を用いてまとめて記憶されたデータを、文字列へ変換して他の情報処理装置へ転送することが可能となる。   According to the present embodiment, the information processing apparatus 1 can convert a data aggregate such as a structure into a character string, and can convert a character string into a data aggregate. As a result, it is possible to convert data stored together using a data aggregate such as a structure in one information processing apparatus into a character string and transfer it to another information processing apparatus.

<実施の形態4>
実施の形態4ではデータ集合体をメンバに含むデータ集合体を文字列へ変換し、また文字列を、データ集合体をメンバに含むデータ集合体へ変換する。本実施の形態に係る情報処理装置1の構成は、実施の形態1と同様である。
<Embodiment 4>
In the fourth embodiment, a data aggregate including a data aggregate as a member is converted into a character string, and a character string is converted into a data aggregate including the data aggregate as a member. The configuration of the information processing apparatus 1 according to the present embodiment is the same as that of the first embodiment.

データ集合体をメンバに含むデータ集合体を文字列へ変換する方法を説明する。図7は、実施の形態4における情報処理装置1が行うデータ集合体を文字列へ変換する処理の例を説明するための説明図である。第1情報処理装置1は、データ集合体40を文字列44へ変換する。データ集合体40は、string型のnameというメンバと、eiyou型のeiyouというメンバを持つとする。eiyou型は、メンバとしてデータ集合体40に含まれている第2のデータ集合体であり、VitaminA、VitaminBというメンバ(いずれもstring型)を持つとする。データ集合体40は、nameに「ステーキ」、eiyou型のVitaminAに「ビタミンA」、ViraminBに「ビタミンB」が代入されているとする。   A method of converting a data aggregate including the data aggregate into a member will be described. FIG. 7 is an explanatory diagram for explaining an example of processing for converting a data aggregate performed by the information processing apparatus 1 according to Embodiment 4 into a character string. The first information processing apparatus 1 converts the data aggregate 40 into a character string 44. It is assumed that the data aggregate 40 has a member named name of the string type and a member named eiyou of the eiyou type. The eiyou type is a second data aggregate included in the data aggregate 40 as a member, and has members VitaminA and VitaminB (both are string types). In the data aggregate 40, “steak” is assigned to name, “vitamin A” is assigned to eiyou-type VitaminA, and “vitamin B” is assigned to ViraminB.

データ集合体40をテキスト変換するためのルーチンは、eiyou型の第2のデータ集合体をテキスト変換するためのルーチンを呼び出す。第2のデータ集合体food.eiyouは、テキスト変換により、johoBという第1の配列41へ変換され、第1の配列41の各要素を含んだ第1の文字列42へ変換される。johoBという第1の配列41は、johoB(0)=”ビタミンA"及びjohoB(1)=”ビタミンB"という要素を含む。第1の配列41は、「eiyou:;ビタミンA;ビタミンB」という第1の文字列42へ変換される。第1の文字列42では、第1の配列41の各要素に格納されたデータが第1の区切り文字「;」を境にして連結され、また、eiyou型のデータ集合体をテキスト変換したことを示す文字列「eiyou:」が付加されている。food.eiyouに値が代入されていない場合は、情報処理装置1は、テキスト変換を行わず、第1の文字列42を空文字列とする。   The routine for text conversion of the data aggregate 40 calls a routine for text conversion of the second data aggregate of the eiyou type. The second data aggregate food.eiyou is converted into a first array 41 called johoB by text conversion, and is converted into a first character string 42 including each element of the first array 41. The first array 41, johoB, includes elements jojoB (0) = “vitamin A” and johoB (1) = “vitamin B”. The first array 41 is converted into a first character string 42 “eiyou :; vitamin A; vitamin B”. In the first character string 42, the data stored in each element of the first array 41 is concatenated with the first delimiter “;” as a boundary, and the eiyou type data aggregate is converted to text. A character string “eiyou:” is added. If no value is assigned to food.eiyou, the information processing apparatus 1 does not perform text conversion and sets the first character string 42 as an empty character string.

データ集合体40は、更に、テキスト変換により、johoAという第2の配列43へ変換され、第2の配列43の各要素を含んだ第2の文字列44へ変換される。第2の配列43は、ARR_NAME=0、ARR_EIYOU=1という定数が定義されている。johoA(ARR_NAME)はstring型のnameが代入され、johoA(ARR_EIYOU)はeiyou型をテキスト変換した第1の文字列42(但し、food.eiyouに値が代入されていない場合は空文字列)が代入される。すなわち、johoA(0)=”ステーキ”、johoA(1)=”eiyou:;ビタミンA;ビタミンB”である。第2の文字列44は、配列johoAを配列変換した文字列「#ステーキ#eiyou:;ビタミンA;ビタミンB」(但し、food.eiyouに値が代入されていない場合は「#ステーキ#」)にfood型のデータ集合体40をテキスト変換したことを示す文字列「food:」が付記されたものである。配列johoAを配列変換した文字列は、第2の配列43の各要素に格納されたデータが第2の区切り文字「#」を境にして連結された文字列である。第2の区切り文字は、第2の配列43のいずれの要素にも存在しない文字である。すなわち文字列45は、「food:#ステーキ#eiyou:;ビタミンA;ビタミンB」(但し、food.eiyouに値が代入されていない場合は「food:#ステーキ#」)となる。   The data aggregate 40 is further converted into a second array 43 called johoA by text conversion, and then converted into a second character string 44 including each element of the second array 43. In the second array 43, constants ARR_NAME = 0 and ARR_EIYOU = 1 are defined. johoA (ARR_NAME) is assigned the name of the string type, and johoA (ARR_EIYOU) is assigned the first character string 42 obtained by converting the eiyou type to text (however, if no value is assigned to food.eiyou) Is done. That is, johoA (0) = “steak”, johoA (1) = “eiyou :; vitamin A; vitamin B”. The second character string 44 is a character string “# steak #eiyou :; vitamin A; vitamin B” obtained by array conversion of the array johoA (however, “# steak #” if no value is assigned to food.eiyou) Is appended with a character string “food:” indicating that the food type data aggregate 40 has been converted into text. The character string obtained by array-converting the array johoA is a character string in which data stored in each element of the second array 43 is connected with the second delimiter character “#” as a boundary. The second delimiter is a character that does not exist in any element of the second array 43. That is, the character string 45 is “food: # steak #eiyou :; vitamin A; vitamin B” (however, if food.eiyou is not assigned a value, “food: # steak #”).

データ集合体40の各メンバと第2の配列43の各要素との対応関係、及び第2のデータ集合体の各メンバと第1の配列41の各要素との対応関係は、予め定められている。例えば、データ集合体40の各メンバが第2の配列43の各要素に対応する順番、及び第2のデータ集合体の各メンバが第1の配列41の各要素に対応する順番が定められている。図8は、実施の形態4におけるデータ集合体の各メンバと配列の各要素との対応関係の例を示す図表である。図8に示す如き対応関係はプログラム12Pに記載されている。CPU11はプログラム12Pを参照することで対応関係を読み込む。なお、図8に示す如き対応関係はプログラム12Pとは別に記憶部12に記憶されていてもよい。図8に示す例では、food.nameとjohoA(0)とが対応し、food.eiyouとjohoA(1)とが対応する。また、food.eiyouのメンバであるVitaminAとjohoB(0)とが対応し、VitaminBとjohoB(1)とが対応する。   The correspondence between each member of the data aggregate 40 and each element of the second array 43 and the correspondence between each member of the second data aggregate and each element of the first array 41 are determined in advance. Yes. For example, the order in which each member of the data aggregate 40 corresponds to each element of the second array 43 and the order in which each member of the second data aggregate corresponds to each element of the first array 41 are determined. Yes. FIG. 8 is a table showing an example of the correspondence between each member of the data aggregate and each element of the array in the fourth embodiment. The correspondence as shown in FIG. 8 is described in the program 12P. The CPU 11 reads the correspondence relationship by referring to the program 12P. Note that the correspondence as shown in FIG. 8 may be stored in the storage unit 12 separately from the program 12P. In the example shown in FIG. 8, food.name and johoA (0) correspond, and food.eiyou and johoA (1) correspond. Moreover, foodAeiyou member VitaminA and johoB (0) correspond, and VitaminB and johoB (1) correspond.

データ集合体をメンバに含むデータ集合体へ文字列を変換する方法を説明する。図9は、実施の形態4における情報処理装置1が行う文字列をデータ集合体へ変換する処理の例を説明するための説明図である。情報処理装置1は、文字列45をデータ集合体49へ変換する。文字列45は「food:#ステーキ#eiyou:;ビタミンA;ビタミンB」である。情報処理装置1は、food型を示す文字列が取得した文字列中の所定の位置に存在するか否かを判定する。当該文字列が所定の位置に存在しない場合は、情報処理装置1は、取得した文字列はfood型から生成された文字列ではないと判定し、処理を中止する。food型を示す文字列が所定の位置に存在する場合は、情報処理装置1は、取得した文字列45からfood型を示す文字列を取り除き、「#ステーキ#eiyou:;ビタミンA;ビタミンB」という文字列を得る。この文字列を配列変換することにより、「ステーキ」及び「eiyou:;ビタミンA;ビタミンB」という文字列461及び462が得られ、johoA(0)=”ステーキ”、johoA(1)=”eiyou:;ビタミンA;ビタミンB”を要素とするjohoAという配列47が得られる。   A method for converting a character string into a data aggregate including a data aggregate as a member will be described. FIG. 9 is an explanatory diagram for explaining an example of a process of converting a character string performed by the information processing apparatus 1 according to the fourth embodiment into a data aggregate. The information processing apparatus 1 converts the character string 45 into the data aggregate 49. The character string 45 is “food: #steak #eiyou :; vitamin A; vitamin B”. The information processing apparatus 1 determines whether a character string indicating the food type is present at a predetermined position in the acquired character string. If the character string does not exist at the predetermined position, the information processing apparatus 1 determines that the acquired character string is not a character string generated from the food type, and stops the processing. When the character string indicating the food type is present at the predetermined position, the information processing apparatus 1 removes the character string indicating the food type from the acquired character string 45, and “#steak #eiyou :; vitamin A; vitamin B”. Is obtained. By converting this character string, character strings 461 and 462 of “steak” and “eiyou :; vitamin A; vitamin B” are obtained, johoA (0) = “steak”, johoA (1) = ”eiyou A sequence 47 called johoA having vitamin A; vitamin B ″ as an element is obtained.

johoA(1)に格納された文字列は、eiyou型を示す文字列を取り除いた上で配列変換され、johoB(0)=”ビタミンA”、johoB(1)=”ビタミンB”を要素とするjohoBという配列48が得られる。food型のデータ集合体49のメンバであるnameにはjohoA(0)が代入され、メンバであるデータ集合体eiyouには、配列johoBの各要素が代入される。但しjohoA(1)が空文字列の場合は、情報処理装置1は、johoA(1)をテキスト変換せず、各メンバにデフォルト値が代入された(値が代入されていない状態がデフォルトの場合はその状態)eiyouを作成する。情報処理装置1は、図8に示す如き予め定められている対応関係に従って、配列の各要素に格納されているデータを、対応するデータ集合体の各メンバに代入する。このようにして、データ集合体をメンバに含むデータ集合体49が作成される。   The character string stored in johoA (1) is converted after removing the character string indicating the eiyou type, and johoB (0) = “vitamin A” and johoB (1) = “vitamin B” are used as elements. An array 48 called johoB is obtained. johoA (0) is assigned to name which is a member of the food type data aggregate 49, and each element of the array johoB is assigned to the data aggregate eiyou which is a member. However, when johoA (1) is an empty character string, the information processing apparatus 1 does not convert the text of johoA (1), and a default value is assigned to each member (if no value is assigned is the default) Create that state) eiyou. The information processing apparatus 1 assigns the data stored in each element of the array to each member of the corresponding data aggregate in accordance with a predetermined correspondence relationship as shown in FIG. In this way, the data aggregate 49 including the data aggregate as a member is created.

情報処理装置1は、データ集合体をテキスト変換するためのルーチン(返り値はboolean型)を作成し、該ルーチンの引数を3つ設ける。引数は、配列を文字列へ変換するのかそれとも逆かを指定する値渡しのboolean型変数(toobj)、参照渡しのデータ集合体(obj)、及び参照渡しのstring型(text)である。toobjがTRUEの場合はtextからテキスト変換により作成されたデータ集合体をobjに代入し、FALSEの場合はobjをテキスト変換して作成された文字列をtextに代入する。いずれの場合も、成功したら返り値はTRUE、失敗したら返り値はFALSEを返す。   The information processing apparatus 1 creates a routine (return value is a boolean type) for text-converting the data aggregate, and provides three arguments for the routine. The argument is a boolean variable (toobj) passed by value that specifies whether to convert the array into a character string or vice versa, a data aggregate (obj) passed by reference, and a string type (text) passed by reference. When toobj is TRUE, a data set created by text conversion from text is assigned to obj, and when it is FALSE, a character string created by text conversion of obj is assigned to text. In either case, the return value is TRUE if it succeeds, and the return value is FALSE if it fails.

図10は、実施の形態4に係る情報処理装置1が行うテキスト変換の処理の手順を示したフローチャートである。図10に示す処理の手順は、データ集合体のテキスト変換を行うためのルーチンによりCPU11が行う処理の一例である。情報処理装置1のCPU11は、プログラム12Pに基づいて以下の処理を実行する。CPU11は、引数に基づいて、データ集合体を文字列へ変換するのかそれとも逆かを判定する(ステップS401)。データ集合体を文字列へ変換する場合(ステップS401:YES)、CPU11は、RAM13又は記憶部12に記憶しているデータ集合体のメンバとして第2のデータ集合体が含まれているか否かを判定する(ステップS402)。第2のデータ集合体が含まれている場合は(ステップS402:YES)、CPU11は、第2のデータ集合体の各メンバに格納されているデータを配列の各要素に代入することにより、第2のデータ集合体から配列を作成する(ステップS403)。ステップS403で作成する配列は第1の配列に対応する。CPU11は、次に、配列を配列変換することにより、文字列を作成する(ステップS404)。ステップS404で作成する文字列は第1の文字列に対応する。   FIG. 10 is a flowchart illustrating a procedure of text conversion processing performed by the information processing apparatus 1 according to the fourth embodiment. The processing procedure shown in FIG. 10 is an example of processing performed by the CPU 11 by a routine for performing text conversion of a data aggregate. The CPU 11 of the information processing device 1 executes the following processing based on the program 12P. Based on the argument, the CPU 11 determines whether to convert the data aggregate into a character string or vice versa (step S401). When converting the data aggregate into a character string (step S401: YES), the CPU 11 determines whether or not the second data aggregate is included as a member of the data aggregate stored in the RAM 13 or the storage unit 12. Determination is made (step S402). When the second data aggregate is included (step S402: YES), the CPU 11 assigns the data stored in each member of the second data aggregate to each element of the array, thereby An array is created from the data aggregate 2 (step S403). The array created in step S403 corresponds to the first array. Next, the CPU 11 creates a character string by converting the array (step S404). The character string created in step S404 corresponds to the first character string.

ステップS404が終了した場合、又は第2のデータ集合体が含まれていない場合は(ステップS402:NO)、CPU11は、データ集合体から配列を作成する(ステップS405)。データ集合体に第2のデータ集合体が含まれている場合は、ステップS404で作成された文字列を要素に格納した配列が作成され、作成された配列は第2の配列に対応する。CPU11は、次に、配列を配列変換することにより、文字列を作成する(ステップS406)。データ集合体に第2のデータ集合体が含まれている場合は、作成される文字列は第2の文字列に対応する。CPU21は、作成した文字列をRAM13又は記憶部12に記憶し、処理を終了する。   When step S404 is completed or when the second data aggregate is not included (step S402: NO), the CPU 11 creates an array from the data aggregate (step S405). When the second data aggregate is included in the data aggregate, an array in which the character string created in step S404 is stored in the element is created, and the created array corresponds to the second array. Next, the CPU 11 creates a character string by converting the array (step S406). When the data aggregate includes the second data aggregate, the created character string corresponds to the second character string. CPU21 memorize | stores the produced character string in RAM13 or the memory | storage part 12, and complete | finishes a process.

ステップS401で、文字列をデータ集合体へ変換する場合は(ステップS401:NO)、CPU11は、RAM13又は記憶部12に記憶している文字列を配列変換することにより、配列を作成する(ステップS407)。CPU11は、次に、配列のいずれかの要素に、データ集合体をテキスト変換した文字列が格納されているか否かを判定する(ステップS408)。例えば、CPU11は、各要素に格納されている文字列に、「eiyou:」等、データ集合体をテキスト変換したことを示す文字列が含まれているか否かを判定する。データ集合体をテキスト変換した文字列がある場合は(S409)、当該文字列を配列変換することにより、配列を作成する(ステップS409)。ステップS409が終了した場合、又はデータ集合体をテキスト変換した文字列が無い場合は(ステップS408:NO)、配列の各要素に格納されているデータをデータ集合体の各メンバに代入することにより、配列からデータ集合体を作成する(ステップS410)。ステップS410では、配列の各要素とデータ集合体の各メンバとの予め定められている対応関係に従って、各要素に格納されているデータが対応するメンバに代入される。CPU11は、作成したデータ集合体をRAM13又は記憶部12に記憶し、処理を終了する。   When converting character strings into data aggregates in step S401 (step S401: NO), the CPU 11 creates an array by converting the character strings stored in the RAM 13 or the storage unit 12 (step S401). S407). Next, the CPU 11 determines whether or not a character string obtained by text-converting the data aggregate is stored in any element of the array (step S408). For example, the CPU 11 determines whether the character string stored in each element includes a character string indicating that the data aggregate has been converted into text, such as “eiyou:”. If there is a character string obtained by text-converting the data aggregate (S409), an array is created by converting the character string into an array (step S409). When step S409 is completed, or when there is no character string obtained by text-converting the data aggregate (step S408: NO), the data stored in each element of the array is assigned to each member of the data aggregate. Then, a data aggregate is created from the array (step S410). In step S410, the data stored in each element is assigned to the corresponding member in accordance with a predetermined correspondence relationship between each element of the array and each member of the data aggregate. CPU11 memorize | stores the produced data aggregate in RAM13 or the memory | storage part 12, and complete | finishes a process.

本実施の形態によれば、情報処理装置1は、データ集合体をメンバに含むデータ集合体を文字列へ変換することができ、また、データ集合体をメンバに含むデータ集合体へ文字列を変換することができる。これにより、データ集合体をメンバに含むデータ集合体を用いてまとめて一の情報処理装置で記憶されたデータを、文字列へ変換して他の情報処理装置へ転送することが可能となる。   According to the present embodiment, the information processing apparatus 1 can convert a data aggregate including a data aggregate into a member to a character string, and can also convert a character string into a data aggregate including the data aggregate as a member. Can be converted. As a result, it is possible to convert data stored together in one information processing apparatus using a data aggregate including the data aggregate as a member into a character string and transfer it to another information processing apparatus.

<実施の形態5>
実施の形態5では、連想配列をメンバに含むデータ集合体を文字列へ変換し、また文字列を、連想配列をメンバに含むデータ集合体へ変換する。本実施の形態に係る情報処理装置1の構成は、実施の形態1と同様である。
<Embodiment 5>
In the fifth embodiment, a data aggregate including an associative array as a member is converted into a character string, and a character string is converted into a data aggregate including an associative array as a member. The configuration of the information processing apparatus 1 according to the present embodiment is the same as that of the first embodiment.

連想配列をメンバに含むデータ集合体を文字列へ変換する方法を説明する。連想配列をメンバに含むデータ集合体をdelta型とする。delta型のデータ集合体は、メンバとしてstring型のnameと、integer型をキーとしてstring型を返す連想配列phoneticと、date型のdays_nodate99991231とを持つ。delta型のオブジェクトであるobjは、obj.name=”フォネティック”、obj.days_nodate99991231=”2017/6/12”、及び連想配列obj.phoneticを含む。obj.phoneticには、1→”あるふぁ”、2→”ぶらぼー”、3→”ちゃーりー”をそれぞれ返す連想配列が代入されている。情報処理装置1は、要素数が3である配列johoAを作成する。ARR_NAME=0、ARR_PHO=1、ARR_DAYS=2が定数として定義されている。情報処理装置1は、johoA(ARR_NAME)にobj.nameつまり「フォネティック」を代入し、johoA(ARR_PHO)に配列変換されたobj.phoneticを代入し、johoA(ARR_DAYS)にobj.days_nodate99991231を示す文字列を代入する。つまり、johoA(ARR_NAME)=”フォネティック”、及びjohoA(ARR_PHO)=”#;1;2;3#;あるふぁ;ぶらぼー;ちゃーりー>”であり、johoA(ARR_DAYS)はobj.days_nodate99991231を示す文字列が代入されている。   A method of converting a data aggregate including associative arrays as members into a character string will be described. A data aggregate including associative arrays as members is assumed to be a delta type. The data set of the delta type has a string type name as a member, an associative array phonetic that returns a string type with an integer type as a key, and a date type days_nodate99991231. obj which is a delta type object includes obj.name = “phonetic”, obj.days_nodate99991231 = “2017/6/12”, and an associative array obj.phonetic. obj.phonetic is assigned an associative array that returns 1 → “something”, 2 → “ballbo”, 3 → “charley”. The information processing apparatus 1 creates an array johoA having three elements. ARR_NAME = 0, ARR_PHO = 1, and ARR_DAYS = 2 are defined as constants. The information processing apparatus 1 assigns obj.name, that is, “phonetic” to johoA (ARR_NAME), substitutes obj.phonetic that has been converted to johoA (ARR_PHO), and character string indicating obj.days_nodate99991231 to johoA (ARR_DAYS) Is assigned. That is, johoA (ARR_NAME) = ”phonetic”, and johoA (ARR_PHO) = ”#; 1; 2; 3 #; alfa; barbo; chabari>” and johoA (ARR_DAYS) is obj.days_nodate99991231 A character string indicating is assigned.

情報処理装置1は、配列johoAを配列変換して、文字列「>フォネティック>#;1;2;3#;あるふぁ;ぶらぼー;ちゃーりー>2017年6月12日」を得る。ここで、「>」は区切り文字である。情報処理装置1は、この文字列にdelta型からテキスト変換されたものであることを示す文字列を付加して、「delta:>フォネティック>#;1;2;3#;あるふぁ;ぶらぼー;ちゃーりー>2017年6月12日」という文字列を得る。   The information processing apparatus 1 converts the array johoA to obtain the character string “> phonetic> #; 1; 2; 3 #; alfa; burabo; chaly-> June 12, 2017”. Here, “>” is a delimiter. The information processing apparatus 1 adds a character string indicating that the character string is converted from the delta type to the character string, and adds “delta:> phonetic >> #; 1; 2; 3 #; -; Charly-> June 12, 2017.

連想配列をメンバに含むデータ集合体へ文字列を変換する方法を説明する。「delta:>フォネティック>#;1;2;3#;あるふぁ;ぶらぼー;ちゃーりー>2017年6月12日」をテキスト変換しようとしているとする。情報処理装置1は、文字列にdelta型からテキスト変換されたものであることを示す文字列が含まれているか否かを判定する。文字列にdelta型からテキスト変換されたものであることを示す文字列が含まれていない場合は、情報処理装置1は、文字列はdelta型からテキスト変換されたものではないと判定し、処理を終了する。文字列にdelta型からテキスト変換されたものであることを示す文字列が含まれている場合は、情報処理装置1は、delta型からテキスト変換されたものであることを示す文字列を取り除いて、「>フォネティック>#;1;2;3#;あるふぁ;ぶらぼー;ちゃーりー>2017年6月12日」を得る。   A method of converting a character string into a data aggregate including associative arrays as members will be described. “Delta:> phonetic> #; 1; 2; 3 #; alfa; burabo; charly> June 12, 2017”. The information processing apparatus 1 determines whether or not a character string indicating that the character string is a text converted from the delta type is included. If the character string does not include a character string indicating that the text is converted from the delta type, the information processing apparatus 1 determines that the character string is not the text converted from the delta type, and performs processing. Exit. If the character string includes a character string indicating that the text has been converted from the delta type, the information processing apparatus 1 removes the character string indicating that the text has been converted from the delta type. , "> Phonetic> #; 1; 2; 3 #; A Fow; Bravo; Charly> June 12, 2017".

情報処理装置1は、得られた文字列を配列変換して、johoA(0)=“フォネティック”、johoA(1)=“#;1;2;3#;あるふぁ;ぶらぼー;ちゃーりー”、及びjohoA(2)=” 2017年6月12日”を要素とする配列johoAを得る。情報処理装置1は、Delta型オブジェクトのメンバであるnameに、johoA(0)を代入し、phoneticにはjohoA(1)をinteger型をキーとする連想配列になるようにテキスト変換したもの(johoA(1)が空文字列である場合は要素数ゼロの連想配列)を代入し、days_nodate99991231にはjohoA(2)を日付型に変換したものを代入する。ただし、johoA(2)に「2017年8月32日」「NO MORE CHILD LABOUR」「」(空文字列)といった日付として扱うことができない文字列が代入されている場合は、情報処理装置1は、obj.days_nodate99991231に9999年12月31日を代入する。   The information processing apparatus 1 converts the obtained character string into an array, and johoA (0) = “phonetic”, johoA (1) = “#; 1; 2; 3 #; Rie "and johoA (2) =" June 12, 2017 "is obtained as an array johoA. The information processing apparatus 1 substitutes johoA (0) for name, which is a member of the Delta type object, and converts the text so that johoA (1) becomes an associative array with the integer type as a key for phonetic (johoA If (1) is an empty string, substitute an associative array with zero elements), and substitute the date_nodate99991231 with johoA (2) converted to a date type. However, if a character string that cannot be handled as a date such as “August 32, 2017”, “NO MORE CHILD LABOR”, or “” (empty character string) is assigned to johoA (2), the information processing apparatus 1 Assign December 31, 9999 to obj.days_nodate99991231.

情報処理装置1は、連想配列をメンバに含むデータ集合体をテキスト変換するためのルーチン(返り値はboolean型)を作成し、ルーチンの引数を3つ設ける。引数は、配列を文字列へ変換するのかそれとも逆かを指定する値渡しのboolean型変数(toobj)、参照渡しのデータ集合体(obj)、及び参照渡しのstring型(text)である。toobjがTRUEの場合はtextをテキスト変換して作成されたデータ集合体をobjに代入し、FALSEの場合はobjをテキスト変換して作成された文字列をtextに代入する。いずれの場合も、成功したら返り値はTRUE、失敗したら返り値はFALSEを返す。   The information processing apparatus 1 creates a routine (return value is a boolean type) for text conversion of a data aggregate including associative arrays as members, and provides three routine arguments. The argument is a boolean variable (toobj) passed by value that specifies whether to convert the array into a character string or vice versa, a data aggregate (obj) passed by reference, and a string type (text) passed by reference. When toobj is TRUE, a data set created by converting text to text is assigned to obj, and when it is FALSE, a character string created by converting obj to text is assigned to text. In either case, the return value is TRUE if it succeeds, and the return value is FALSE if it fails.

データ集合体は、クラスを用いてオブジェクトを定義した場合等、データ集合体の外部からアクセスできないメンバを持つ場合がある。この場合、データ集合体のメンバである連想配列phoneticに代入がなされたとき、情報処理装置1は、代入された内容を、phoneticと同じデータ型であり外部からアクセスできない連想配列p_phoneticに書き込む。書き込み時にp_phoneticが無い場合は、情報処理装置1は、例えばNewステートメントにより、p_phoneticを作成する。連想配列phoneticから値を読み出そうとしたとき、p_phoneticが無いのであれば、情報処理装置1は、p_phoneticが要素数ゼロの配列であるとして処理を行う。p_phoneticがあれば、情報処理装置1は、p_phoneticから取り出された値を返す。   A data aggregate may have members that cannot be accessed from outside the data aggregate, such as when an object is defined using a class. In this case, when an assignment is made to the associative array phonetic that is a member of the data aggregate, the information processing apparatus 1 writes the assigned content into the associative array p_phonetic that has the same data type as the phonetic and cannot be accessed from the outside. If there is no p_phonetic at the time of writing, the information processing apparatus 1 creates p_phonetic by, for example, a New statement. If there is no p_phonetic when trying to read a value from the associative array phonetic, the information processing apparatus 1 performs processing assuming that p_phonetic is an array having zero elements. If there is p_phonetic, the information processing apparatus 1 returns a value extracted from p_phonetic.

実施の形態5に係る情報処理装置1は、図6に示したステップS31〜S35と同様の処理を実行することにより、連想配列をメンバに含むデータ集合体のテキスト変換を実行する。CPU11は、プログラム12Pに基づいてステップS31〜S35と同様の処理を実行する。ステップS32では、CPU11は、RAM13又は記憶部12に記憶しているデータ集合体のメンバに含まれる連想配列を配列変換して文字列を作成し、作成した配列及び他のメンバを配列の各要素に代入することにより、データ集合体から配列を作成する。ステップS33が終了した後、CPU21は、作成した文字列をRAM13又は記憶部12に記憶する。ステップS35では、CPU11は、RAM13又は記憶部12に記憶している文字列を配列変換した後、配列の要素に格納されている、連想配列を配列変換した文字列を、連想配列へ変換する。ステップS35が終了した後、CPU11は、作成したデータ集合体をRAM13又は記憶部12に記憶する。   The information processing apparatus 1 according to the fifth embodiment executes text conversion of a data aggregate that includes associative arrays as members by executing processing similar to steps S31 to S35 illustrated in FIG. CPU11 performs the process similar to step S31-S35 based on the program 12P. In step S32, the CPU 11 converts the associative array included in the members of the data aggregate stored in the RAM 13 or the storage unit 12 to generate a character string, and the generated array and other members are used as each element of the array. Create an array from the data aggregate by assigning to. After step S33 ends, the CPU 21 stores the created character string in the RAM 13 or the storage unit 12. In step S35, the CPU 11 converts the character string stored in the RAM 13 or the storage unit 12 into an associative array after converting the associative array stored in the elements of the array. After step S35 is completed, the CPU 11 stores the created data aggregate in the RAM 13 or the storage unit 12.

<実施の形態6>
実施の形態6では、配列をメンバに含むデータ集合体を文字列へ変換し、また文字列を、配列をメンバに含むデータ集合体へ変換する。本実施の形態に係る情報処理装置1の構成は、実施の形態1と同様である。
<Embodiment 6>
In the sixth embodiment, a data aggregate including an array as a member is converted into a character string, and a character string is converted into a data aggregate including an array as a member. The configuration of the information processing apparatus 1 according to the present embodiment is the same as that of the first embodiment.

配列をメンバに含むデータ集合体を文字列へ変換する方法を説明する。配列をメンバに含むデータ集合体をecho型とする。echo型のデータ集合体は、メンバとしてboolean型のispayと、decimal型のpayと、decimal型のtaxと、delta型の配列であるarrとを持つ。ただし、payとtaxはispay=falseの場合は例外をスローする。echo型のオブジェクトであるobjは、obj.ispay=TRUE、obj.pay=200、obj.tax=0.08、及びobj.arrを含む。obj.arrにはdelta型の配列が入っている。情報処理装置1は、要素数が4である配列johoAを作成する。ARR_ISPAY=0、ARR_PAY=1、ARR_TAX=2、ARR_DELTA=3が定数として定義されている。   A method for converting a data set including an array into a member will be described. A data aggregate including an array as a member is an echo type. The echo type data aggregate has a boolean type ispay, a decimal type pay, a decimal type tax, and an arr which is a delta type array. However, pay and tax throw an exception if ispay = false. obj which is an echo type object includes obj.ispay = TRUE, obj.pay = 200, obj.tax = 0.08, and obj.arr. obj.arr contains a delta type array. The information processing apparatus 1 creates an array johoA having four elements. ARR_ISPAY = 0, ARR_PAY = 1, ARR_TAX = 2, and ARR_DELTA = 3 are defined as constants.

情報処理装置1は、johoA(ARR_ISPAY)にはobj.ispayを文字列型に変換したものを代入し、johoA(ARR_PAY)にはobj.payを文字列型に変換したものを代入し、johoA(ARR_TAX)にはobj.taxを文字列型に変換したものを代入する。また、情報処理装置1は、配列obj.arrと同数の要素数を持つ配列johoBを作成し、obj.arrの各要素に対応するjohoBの各要素に、obj.arrの各要素をテキスト変換した文字列を代入する。例えば、obj.arrの要素と同一番号のjohoBの要素が、obj.arrの要素と対応している。情報処理装置1は、配列johoBを配列変換し、配列変換により作成した文字列をjohoA(ARR_DELTA)に代入する。ただし、情報処理装置1は、obj.ispay=FALSEである場合はjohoA(ARR_PAY)およびjohoA(ARR_TAX)に空文字列を代入する。情報処理装置1は、配列johoAを配列変換し、配列変換により作成した文字列に、echo型をテキスト変換した文字列であることを示す文字列を付加する。   The information processing apparatus 1 substitutes johoA (ARR_ISPAY) for converting obj.ispay into a character string type, assigns johoA (ARR_PAY) for converting obj.pay into a character string type, and jojoA ( ARR_TAX) is substituted with obj.tax converted to a string type. Further, the information processing apparatus 1 creates an array johoB having the same number of elements as the array obj.arr, and text-converts each element of obj.arr to each element of johoB corresponding to each element of obj.arr. Assign a string. For example, the element of johoB having the same number as the element of obj.arr corresponds to the element of obj.arr. The information processing apparatus 1 converts the array johoB, and substitutes the character string created by the array conversion into johoA (ARR_DELTA). However, when obj.ispay = FALSE, the information processing apparatus 1 substitutes an empty character string for johoA (ARR_PAY) and johoA (ARR_TAX). The information processing apparatus 1 performs array conversion on the array johoA, and adds a character string indicating a character string obtained by text-converting the echo type to a character string created by the array conversion.

配列をメンバに含むデータ集合体へ文字列を変換する方法を説明する。配列をメンバに含むデータ集合体をテキスト変換した文字列を変換しようとしているとする。情報処理装置1は、文字列にecho型からテキスト変換されたものであることを示す文字列が含まれているか否かを判定する。文字列にecho型からテキスト変換されたものであることを示す文字列が含まれていない場合は、情報処理装置1は、文字列はecho型からテキスト変換されたものではないと判定し、処理を終了する。文字列にecho型からテキスト変換されたものであることを示す文字列が含まれている場合は、情報処理装置1は、変換対象の文字列から、echo型からテキスト変換されたものであることを示す文字列を取り除き、配列変換を行う。配列変換により作成された配列をjohoAとする。このとき、johoA(0)は真理値型に変換すればtrueとなる文字列が格納され、johoA(1)は十進型に変換すれば200となる文字列が格納され、johoA(2)は十進型に変換すれば0.08となる文字列が格納されている。また、johoA(3)は、配列変換すればdelta型をテキスト変換したものが代入されている配列になる文字列が格納されている。   A method of converting a character string into a data aggregate including an array as a member will be described. Suppose you are trying to convert a character string that has been converted from a data set that contains an array as a member. The information processing apparatus 1 determines whether or not the character string includes a character string indicating that text conversion has been performed from the echo type. If the character string does not include a character string indicating that the text is converted from the echo type, the information processing apparatus 1 determines that the character string is not the text converted from the echo type, and performs processing. Exit. If the character string includes a character string indicating that the text is converted from the echo type, the information processing apparatus 1 is a text converted from the echo type from the character string to be converted. Is removed, and array conversion is performed. An array created by array conversion is called johoA. At this time, johoA (0) stores a character string that is true if converted to a truth type, johoA (1) stores a character string that becomes 200 if converted to a decimal type, and johoA (2) stores A character string of 0.08 is stored if converted to the decimal type. In addition, johoA (3) stores a character string that becomes an array into which a text-converted delta type is substituted if the array is converted.

情報処理装置1は、obj.ispayにjohoA(0)を真理値に変換したものを代入し、obj.payにjohoA(1)を十進型に変換したものを代入し、obj.taxにjohoA(2)を十進型に変換したものを代入する。ただし、情報処理装置1は、obj.ispayにFALSEが代入されたときは、obj.pay、obj.taxへの代入を行わない。情報処理装置1は、johoA(3)に格納された文字列を配列変換した配列(johoA(3)が空文字列である場合は要素数ゼロの配列)johoBを作成し、obj.arrにjohoBと同数の要素数を定義する。johoBの各要素をテキスト変換し、johoBの各要素に対応するobj.arrの各要素に、johoBの各要素をテキスト変換したデータを代入する。例えば、johoBの要素と同一番号のobj.arrの要素が、johoBの要素と対応している。   The information processing apparatus 1 substitutes a value obtained by converting johoA (0) into a truth value in obj.ispay, substitutes a value obtained by converting johoA (1) into a decimal type in obj.pay, and assigns johoA in obj.tax. Assign (2) converted to decimal type. However, when FALSE is substituted for obj.ispay, the information processing apparatus 1 does not substitute for obj.pay and obj.tax. The information processing apparatus 1 creates an array (an array with zero elements if johoA (3) is an empty string) johoB by converting the character string stored in johoA (3), and johoB and obj.arr Define the same number of elements. Each element of johoB is converted to text, and data obtained by converting each element of johoB into text is assigned to each element of obj.arr corresponding to each element of johoB. For example, the obj.arr element with the same number as the johoB element corresponds to the johoB element.

情報処理装置1は、配列をメンバに含むデータ集合体をテキスト変換するためのルーチン(返り値はboolean型)を作成し、ルーチンの引数を3つ設ける。1つ目の引数はデータ集合体を文字列へ変換するのかそれとも逆かを指定する値渡しのboolean型変数(toobj)である。2つ目の引数は参照渡しのデータ集合体(obj)である。3つ目の引数は参照渡しのstring(text)型である。toobjがTRUEの場合はtextをテキスト変換して作成されたデータ集合体をobjに代入し、FALSEの場合はobjをテキスト変換して作成された文字列をtextに代入する。いずれの場合も、成功したら返り値はTRUE、失敗したら返り値はFALSEを返す。   The information processing apparatus 1 creates a routine (return value is a boolean type) for text conversion of a data aggregate including an array as a member, and provides three routine arguments. The first argument is a boolean variable (toobj) passed by value that specifies whether the data set is converted to a string or vice versa. The second argument is a data collection (obj) passed by reference. The third argument is a string (text) type passed by reference. When toobj is TRUE, a data set created by converting text to text is assigned to obj, and when it is FALSE, a character string created by converting obj to text is assigned to text. In either case, the return value is TRUE if it succeeds, and the return value is FALSE if it fails.

実施の形態6に係る情報処理装置1は、図6に示したステップS31〜S35と同様の処理を実行することにより、配列をメンバに含むデータ集合体のテキスト変換を実行する。CPU11は、プログラム12Pに基づいてステップS31〜S35と同様の処理を実行する。ステップS32では、CPU11は、RAM13又は記憶部12に記憶しているデータ集合体のメンバに含まれる配列を配列変換して文字列を作成し、作成した配列及び他のメンバを配列の各要素に代入することにより、データ集合体から配列を作成する。ステップS33が終了した後、CPU21は、作成した文字列をRAM13又は記憶部12に記憶する。ステップS35では、CPU11は、RAM13又は記憶部12に記憶している文字列を配列変換した後、配列の要素に格納されている、配列を配列変換した文字列を、配列へ変換する。ステップS35が終了した後、CPU11は、作成したデータ集合体をRAM13又は記憶部12に記憶する。   The information processing apparatus 1 according to the sixth embodiment executes text conversion of a data aggregate that includes an array as a member by executing processing similar to steps S31 to S35 illustrated in FIG. CPU11 performs the process similar to step S31-S35 based on the program 12P. In step S32, the CPU 11 converts the array included in the members of the data aggregate stored in the RAM 13 or the storage unit 12 to create a character string, and uses the generated array and other members as elements of the array. By assigning, an array is created from the data collection. After step S33 ends, the CPU 21 stores the created character string in the RAM 13 or the storage unit 12. In step S <b> 35, the CPU 11 converts the character string stored in the RAM 13 or the storage unit 12 into an array, and then converts the character string stored in the element of the array into the array. After step S35 is completed, the CPU 11 stores the created data aggregate in the RAM 13 or the storage unit 12.

<実施の形態7>
実施の形態7では、データ集合体を情報処理装置間で転送する。図11は、実施の形態7に係る情報処理システムの構成を示すブロック図である。情報処理システムは、情報処理装置(第1情報処理装置)1及び第2情報処理装置2を備える。情報処理装置1の構成は、実施の形態1〜6と同様である。図11に示すように、情報処理装置1及び第2情報処理装置2は、通信網Nに接続されている。
<Embodiment 7>
In the seventh embodiment, the data aggregate is transferred between information processing apparatuses. FIG. 11 is a block diagram illustrating a configuration of an information processing system according to the seventh embodiment. The information processing system includes an information processing device (first information processing device) 1 and a second information processing device 2. The configuration of the information processing apparatus 1 is the same as in the first to sixth embodiments. As shown in FIG. 11, the information processing apparatus 1 and the second information processing apparatus 2 are connected to a communication network N.

第2情報処理装置2は、サーバ装置、パーソナルコンピュータ又はスマートフォン等のコンピュータである。第2情報処理装置2は、CPU21、記憶部22、RAM23、入力部24、表示部25、通信部26及びドライブ部27を備える。第2情報処理装置2のCPU21、記憶部22、RAM23、入力部24、表示部25、通信部26及びドライブ部27の構成は、情報処理装置1のCPU11、記憶部12、RAM13、入力部14、表示部15、通信部16及びドライブ部17の構成と同様であるため、簡潔のため記載を省略する。CPU21は、光ディスク等の記録媒体20に記録されたプログラム22Pをドライブ部27に読み取らせ、読み取ったプログラム22Pを記憶部22に記憶させる。なお、プログラム22Pは、サーバ2の外部からダウンロードされてもよく、予め記憶部22に記憶されていてもよい。この場合、サーバ2は、ドライブ部27を備えていない形態であってもよい。   The second information processing device 2 is a computer such as a server device, a personal computer, or a smartphone. The second information processing apparatus 2 includes a CPU 21, a storage unit 22, a RAM 23, an input unit 24, a display unit 25, a communication unit 26, and a drive unit 27. The configuration of the CPU 21, the storage unit 22, the RAM 23, the input unit 24, the display unit 25, the communication unit 26, and the drive unit 27 of the second information processing device 2 is the same as the CPU 11, the storage unit 12, the RAM 13, and the input unit 14 of the information processing device 1. The display unit 15, the communication unit 16, and the drive unit 17 are the same in configuration, and are not described for the sake of brevity. The CPU 21 causes the drive unit 27 to read the program 22P recorded on the recording medium 20 such as an optical disc, and causes the storage unit 22 to store the read program 22P. Note that the program 22P may be downloaded from the outside of the server 2 or may be stored in the storage unit 22 in advance. In this case, the server 2 may not include the drive unit 27.

情報処理装置1及び第2情報処理装置2は、図5又は図8に示す如き、予め定められているデータ集合体と配列との対応関係を記憶している。例えば、対応関係は、プログラム12P及びプログラム22Pに含まれている。また例えば、対応関係は、記憶部12及び記憶部22に記憶されている。   The information processing apparatus 1 and the second information processing apparatus 2 store a correspondence relationship between a predetermined data aggregate and an array as illustrated in FIG. 5 or FIG. For example, the correspondence relationship is included in the program 12P and the program 22P. Further, for example, the correspondence relationship is stored in the storage unit 12 and the storage unit 22.

図12は、実施の形態7に係る情報処理システムが実行する処理の手順を示すフローチャートである。情報処理装置1のCPU11は、プログラム12Pに基づいて以下のステップS51〜S54の処理を実行し、第2情報処理装置2のCPU21は、プログラム22Pに基づいて以下のステップS55〜S59の処理を実行する。CPU11は、RAM13又は記憶部12に記憶しているデータ集合体の中から、転送すべきデータ集合体を指定する(ステップS51)。ステップS51では、CPU11は、例えば、使用者が入力部14を操作することによって、転送すべきデータ集合体を示す情報を受け付け、受け付けた情報が示すデータ集合体を指定する。CPU11は、次に、指定したデータ集合体をテキスト変換することにより、データ集合体を変換した文字列を作成する(ステップS52)。データ集合体を文字列へ変換する方法は、実施の形態1〜6で説明した方法と同様である。CPU11は、次に、作成した文字列を含むデータファイルを作成し(ステップS53)、作成したデータファイルを、通信部16に、通信網Nを介して第2情報処理装置2へ送信させる(ステップS54)。データ集合体を変換した文字列は、テキストデータとしてデータファイルに含まれる。   FIG. 12 is a flowchart illustrating a procedure of processing executed by the information processing system according to the seventh embodiment. The CPU 11 of the information processing device 1 executes the following steps S51 to S54 based on the program 12P, and the CPU 21 of the second information processing device 2 executes the following steps S55 to S59 based on the program 22P. To do. The CPU 11 designates a data aggregate to be transferred from among the data aggregates stored in the RAM 13 or the storage unit 12 (step S51). In step S51, for example, the user operates the input unit 14 to accept information indicating a data aggregate to be transferred, and designates the data aggregate indicated by the received information. Next, the CPU 11 creates a character string obtained by converting the data aggregate by text-converting the designated data aggregate (step S52). A method for converting a data aggregate into a character string is the same as the method described in the first to sixth embodiments. Next, the CPU 11 creates a data file including the created character string (step S53), and causes the communication unit 16 to transmit the created data file to the second information processing apparatus 2 via the communication network N (step S53). S54). The character string obtained by converting the data aggregate is included in the data file as text data.

第2情報処理装置2は、情報処理装置1から送信されたデータファイルを通信部26で受信する(ステップS55)。第2情報処理装置2は、受信したデータファイルをRAM23又は記憶部22に記憶し、CPU21は、受信したデータファイルの中から、データファイルを指定する(ステップS56)。より詳しくは、CPU21は、取得すべきデータ集合体に係る文字列が含まれているデータファイルを指定する。CPU11は、例えば、使用者が入力部24を操作することによって、データファイルを示す情報を受け付け、受け付けた情報が示すデータファイルを指定する。CPU21は、次に、指定したデータファイルから、データ集合体が変換された文字列を取得し(ステップS57)、テキスト変換により、文字列をデータ集合体へ変換する(ステップS58)。文字列をデータ集合体へ変換する方法は、実施の形態1〜6で説明した方法と同様である。CPU21は、作成したデータ集合体を記憶部22に保存し(ステップS59)、処理を終了する。   The second information processing device 2 receives the data file transmitted from the information processing device 1 by the communication unit 26 (step S55). The second information processing apparatus 2 stores the received data file in the RAM 23 or the storage unit 22, and the CPU 21 designates a data file from the received data file (step S56). More specifically, the CPU 21 designates a data file that includes a character string related to the data aggregate to be acquired. For example, when the user operates the input unit 24, the CPU 11 receives information indicating a data file and designates the data file indicated by the received information. Next, the CPU 21 acquires a character string obtained by converting the data aggregate from the designated data file (step S57), and converts the character string into a data aggregate by text conversion (step S58). A method for converting a character string into a data aggregate is the same as the method described in the first to sixth embodiments. The CPU 21 stores the created data aggregate in the storage unit 22 (step S59) and ends the process.

本実施の形態によれば、情報処理装置1は、データ集合体を文字列へ変換して第2情報処理装置2へ送信し、第2情報処理装置2は、受信した文字列をデータ集合体へ変換する。これにより、一以上のデータをまとめたデータ集合体を情報処理装置1から第2情報処理装置2へ転送することが可能となる。   According to the present embodiment, the information processing apparatus 1 converts the data aggregate into a character string and transmits it to the second information processing apparatus 2, and the second information processing apparatus 2 converts the received character string into the data aggregate. Convert to Thereby, it is possible to transfer a data aggregate in which one or more pieces of data are collected from the information processing apparatus 1 to the second information processing apparatus 2.

<実施の形態8>
実施の形態8では、情報処理装置はデータ集合体をダウンロードにより取得する。図13は、実施の形態8に係る情報処理システムの構成を示すブロック図である。情報処理システムは、情報処理装置(第1情報処理装置)1、第2情報処理装置2及び記憶装置3を備える。情報処理装置1及び第2情報処理装置2の構成は、実施の形態7と同様である。図11に示すように、情報処理装置1、第2情報処理装置2及び記憶装置3は、通信網Nに接続されている。
<Eighth embodiment>
In the eighth embodiment, the information processing apparatus acquires a data aggregate by downloading. FIG. 13 is a block diagram illustrating a configuration of an information processing system according to the eighth embodiment. The information processing system includes an information processing device (first information processing device) 1, a second information processing device 2, and a storage device 3. The configurations of the information processing apparatus 1 and the second information processing apparatus 2 are the same as those in the seventh embodiment. As illustrated in FIG. 11, the information processing device 1, the second information processing device 2, and the storage device 3 are connected to a communication network N.

記憶装置3は、サーバ装置等のコンピュータである。記憶装置3は、CPU31、記憶部32、RAM33及び通信部34を備える。記憶部32は例えばハードディスク又は大容量メモリ等である。CPU31は、記憶部32に記憶されたプログラム32Pに従いハードウェアの各部を制御する。通信部34は、通信網Nを介して各種情報を送受信する。   The storage device 3 is a computer such as a server device. The storage device 3 includes a CPU 31, a storage unit 32, a RAM 33, and a communication unit 34. The storage unit 32 is, for example, a hard disk or a large capacity memory. The CPU 31 controls each part of the hardware according to the program 32P stored in the storage unit 32. The communication unit 34 transmits and receives various information via the communication network N.

本実施形態では、情報処理装置1はデータ集合体をテキスト変換して記憶装置3へアップロードし、第2情報処理装置2は記憶装置3からデータをダウンロードすることによりデータ集合体を取得する。図14は、実施の形態8に係る情報処理装置1が実行する処理の手順を示すフローチャートである。情報処理装置1のCPU11は、プログラム12Pに基づいて以下の処理を実行する。CPU11は、RAM13又は記憶部12に記憶しているデータ集合体をテキスト変換することにより、データ集合体を変換した文字列を作成し、作成した文字列を含むデータファイルを作成する(ステップS61)。データ集合体を文字列へ変換する方法は、実施の形態1〜6で説明した方法と同様である。データ集合体を変換した文字列は、テキストデータとしてデータファイルに含まれる。   In the present embodiment, the information processing apparatus 1 converts the data aggregate into text and uploads the data aggregate to the storage device 3, and the second information processing apparatus 2 acquires the data aggregate by downloading data from the storage device 3. FIG. 14 is a flowchart showing a procedure of processing executed by the information processing apparatus 1 according to the eighth embodiment. The CPU 11 of the information processing device 1 executes the following processing based on the program 12P. The CPU 11 converts the data aggregate stored in the RAM 13 or the storage unit 12 into text, thereby creating a character string obtained by converting the data aggregate, and creates a data file including the created character string (step S61). . A method for converting a data aggregate into a character string is the same as the method described in the first to sixth embodiments. The character string obtained by converting the data aggregate is included in the data file as text data.

CPU11は、次に、データ集合体に関する設定内容を各データ集合体別に記録したリストを作成し、作成したリストを含むリストファイルを作成する(ステップS62)。データ集合体に関する設定内容には、データ集合体を変換した文字列が含まれるデータファイルの名称、データファイルをダウンロードできる期間、データ集合体の定義、データ集合体のメンバとデータ集合体を変換した配列の要素との対応関係等が含まれている。CPU11は、次に、データファイル及びリストファイルを、通信部16に、通信網Nを介して記憶装置3へ送信させ(ステップS63)、処理を終了する。   Next, the CPU 11 creates a list in which setting contents relating to the data aggregate are recorded for each data aggregate, and creates a list file including the created list (step S62). The settings related to the data aggregate include the name of the data file that contains the character string converted from the data aggregate, the period during which the data file can be downloaded, the definition of the data aggregate, and the data aggregate members and data aggregates converted. Correspondences with array elements are included. Next, the CPU 11 causes the communication unit 16 to transmit the data file and the list file to the storage device 3 via the communication network N (step S63), and ends the process.

記憶装置3は、情報処理装置1から送信されたデータファイル及びリストファイルを通信部34で受信し、受信したデータファイル及びリストファイルを記憶部32に記憶する。この結果、記憶部32にはデータファイル321及びリストファイル322が記憶されている。   The storage device 3 receives the data file and list file transmitted from the information processing device 1 by the communication unit 34, and stores the received data file and list file in the storage unit 32. As a result, the data file 321 and the list file 322 are stored in the storage unit 32.

図15は、実施の形態8に係る第2情報処理装置2が実行する処理の手順を示すフローチャートである。CPU21は、通信部26に、記憶装置3から通信網Nを介してリストファイル322をダウンロードさせる(ステップS71)。CPU21は、次に、リストファイル322を利用して、ダウンロードすべきデータファイルを指定する(ステップS72)。ダウンロードすべきデータファイルを指定する方法には、種々の方法が用いられ得る。例えば、CPU21は、リストファイル322を利用して、データファイルの名称等のデータ集合体に関する設定内容のリストを表示部25に表示させ、表示されたリストを視認した使用者が入力部24を操作することによって、データファイルを示す情報を受け付け、受け付けた情報が示すデータファイルを指定してもよい。また、例えば、CPU21は、リストに記録されたデータファイルを無条件で指定してもよい。また、例えば、CPU21は、作成されてからの経過時間が一定期間内であるデータファイルを指定する等、時刻に応じてデータファイルを指定してもよい。CPU21は、次に、指定したデータファイル321を、通信部26に、記憶装置3から通信網Nを介してダウンロードさせる(ステップS73)。CPU21は、ダウンロードしたデータファイル321をRAM23又は記憶部22に記憶する。   FIG. 15 is a flowchart illustrating a procedure of processing executed by the second information processing apparatus 2 according to the eighth embodiment. The CPU 21 causes the communication unit 26 to download the list file 322 from the storage device 3 via the communication network N (step S71). Next, the CPU 21 uses the list file 322 to designate a data file to be downloaded (step S72). Various methods can be used for designating the data file to be downloaded. For example, the CPU 21 uses the list file 322 to display a list of setting contents related to the data aggregate such as the name of the data file on the display unit 25, and the user who visually recognizes the displayed list operates the input unit 24. By doing so, information indicating a data file may be received, and the data file indicated by the received information may be designated. For example, the CPU 21 may unconditionally specify the data file recorded in the list. Further, for example, the CPU 21 may designate a data file according to time, such as designating a data file whose elapsed time from creation is within a certain period. Next, the CPU 21 causes the communication unit 26 to download the designated data file 321 from the storage device 3 via the communication network N (step S73). The CPU 21 stores the downloaded data file 321 in the RAM 23 or the storage unit 22.

CPU21は、ダウンロードしたデータファイル321の中から、データ集合体が変換された文字列を取得し(ステップS74)、テキスト変換により、文字列をデータ集合体へ変換する(ステップS75)。文字列をデータ集合体へ変換する方法は、実施の形態1〜6で説明した方法と同様である。CPU21は、作成したデータ集合体を記憶部22に保存し(ステップS76)、処理を終了する。   The CPU 21 acquires a character string obtained by converting the data aggregate from the downloaded data file 321 (step S74), and converts the character string into the data aggregate by text conversion (step S75). A method for converting a character string into a data aggregate is the same as the method described in the first to sixth embodiments. The CPU 21 stores the created data aggregate in the storage unit 22 (step S76) and ends the process.

本実施の形態によれば、情報処理装置1は、データ集合体を文字列へ変換し、文字列を含むデータを記憶装置3へアップロードし、第2情報処理装置2は、文字列を含むデータをダウンロードし、文字列をデータ集合体へ変換する。これにより、複数のデータをまとめたデータ集合体を、記憶装置3を中継して情報処理装置1から第2情報処理装置2へ転送することが可能となる。また、記憶装置3に記憶されているデータを情報処理装置で随時ダウンロードしてデータ集合体を作成することにより、複数の情報処理装置でデータ集合体を共用することができる。   According to the present embodiment, the information processing device 1 converts the data aggregate into a character string, uploads data including the character string to the storage device 3, and the second information processing device 2 includes data including the character string. Is downloaded and the character string is converted into a data collection. Thereby, it is possible to transfer a data aggregate in which a plurality of pieces of data are collected from the information processing apparatus 1 to the second information processing apparatus 2 via the storage device 3. In addition, the data aggregate can be shared by a plurality of information processing apparatuses by creating data aggregates by downloading data stored in the storage device 3 as needed.

なお、実施の形態7及び8においては、通信網Nを介してデータの転送を行う形態を示したが、情報処理装置1及び第2情報処理装置2は、その他の方法でデータの転送を行う形態であってもよい。例えば、情報処理装置1は、データ集合体を変換した文字列を記録媒体に記録することによって文字列を出力し、第2情報処理装置2は、記録媒体から文字列を読み出すことによって文字列を取得し、文字列をデータ集合体へ変換してもよい。   In the seventh and eighth embodiments, the mode of transferring data via the communication network N is shown. However, the information processing apparatus 1 and the second information processing apparatus 2 transfer data by other methods. Form may be sufficient. For example, the information processing device 1 outputs a character string by recording a character string obtained by converting the data aggregate on a recording medium, and the second information processing device 2 reads the character string from the recording medium to output the character string. Obtaining and converting the character string into a data aggregate.

また、実施の形態1〜8においては、データ集合体は、当該データ集合体の外部からアクセスできないメンバを持つことができる。図16は、外部からアクセスできないメンバを持つデータ集合体4に対する処理の概念を示す概念図である。情報処理装置1(又は第2情報処理装置2)は、データ集合体4がデータ集合体4の外部からアクセスできないメンバを持つ場合、外部からのアクセス可能なメンバ41に代入401があったとき、代入された内容を、外部からアクセスできないメンバ42に代入402を行う。メンバ41から値を取り出すとき、情報処理装置1(又は第2情報処理装置2)は、メンバ42の内容の確認403を行い、メンバ42に値が代入されていないとき(メンバ42のデータ型について予め定められている特定の値が代入されているときを含む)は、予め決められた値を返す(404)。例えば、メンバ42が配列又は連想配列であれば、要素数0の配列又は連想配列が返される。メンバ42が配列及び連想配列以外のデータ集合体であれば、各メンバにデフォルト値が代入された状態(値が代入されていない状態がデフォルトの場合はその状態)のデータ集合体が返される。メンバ42に値が代入されているとき(特定の値が代入されているときを除く)は、情報処理装置1は、メンバ42に代入された値を返す(404)。   In the first to eighth embodiments, a data aggregate can have members that cannot be accessed from outside the data aggregate. FIG. 16 is a conceptual diagram showing the concept of processing for the data aggregate 4 having members that cannot be accessed from the outside. When the data aggregate 4 has a member that cannot be accessed from outside the data aggregate 4, the information processing apparatus 1 (or the second information processing apparatus 2) has an assignment 401 to the member 41 that is accessible from the outside. The assigned content is assigned 402 to the member 42 that cannot be accessed from the outside. When the value is extracted from the member 41, the information processing apparatus 1 (or the second information processing apparatus 2) checks the content 403 of the member 42, and when no value is assigned to the member 42 (about the data type of the member 42) (Including a case where a predetermined specific value is substituted), returns a predetermined value (404). For example, if the member 42 is an array or associative array, an array or associative array with 0 elements is returned. If the member 42 is a data aggregate other than an array and an associative array, a data aggregate in a state where a default value is assigned to each member (or a state where no value is assigned is the default) is returned. When a value is assigned to the member 42 (except when a specific value is assigned), the information processing apparatus 1 returns the value assigned to the member 42 (404).

また、実施の形態1〜8においては、変数がNull許容型である場合、変数は、値を文字列にするときに、変数のデータ型の値にならない文字列を代入されることができる。例えば、変数は、数値型であれば、空文字列などの数値にならない値を代入されることができ、日付型であれば、空文字列などの日付にならない値を代入されることができる。Null許容型の変数にそのデータ型にならない文字列を代入しようとする場合、代わりにNullを代入することができる。   In the first to eighth embodiments, when the variable is a null-allowable type, the variable can be assigned a character string that does not become the value of the variable data type when the value is a character string. For example, a variable can be assigned a non-numeric value such as an empty character string if it is a numeric type, and can be assigned a non-date value such as an empty string if it is a date type. If you want to assign a string that does not have that data type to a nullable variable, you can substitute Null instead.

今回開示された実施の形態はすべての点で例示であって、制限的なものではないと考えられるべきである。本発明の範囲は、上記した意味ではなく、特許請求の範囲によって示され、特許請求の範囲と均等の意味及び範囲内でのすべての変更が含まれることが意図される。また、各実施の形態は、処理内容を矛盾させない範囲で適宜組み合わせることが可能である。   The embodiment disclosed this time is to be considered as illustrative in all points and not restrictive. The scope of the present invention is defined by the terms of the claims, rather than the meanings described above, and is intended to include any modifications within the scope and meaning equivalent to the terms of the claims. Further, each embodiment can be appropriately combined within a range in which processing contents are not contradictory.

1 情報処理装置(第1情報処理装置)
12P プログラム
2 第2情報処理装置
22P プログラム
1 Information processing device (first information processing device)
12P program 2 2nd information processing apparatus 22P program

Claims (6)

データ集合体に含まれる一個以上のメンバに格納されたデータを、配列の一個以上の要素に格納する配列作成処理と、
前記配列の一個以上の要素に格納されたデータ及びデータの区切りを示す区切り文字を含んだ文字列を作成する文字列作成処理と
を情報処理装置に実行させるプログラム。
An array creation process for storing data stored in one or more members included in the data aggregate in one or more elements of the array;
A program for causing an information processing apparatus to execute data stored in one or more elements of the array and a character string creating process for creating a character string including a delimiter indicating a delimiter of the data.
前記配列作成処理は、
前記データ集合体に第2のデータ集合体が含まれる場合に、該第2のデータ集合体に含まれる一個以上のメンバに格納されたデータを、第1の配列の一個以上の要素に格納し、
前記第1の配列の一個以上の要素に格納されたデータ及び第1の区切り文字を含んだ第1の文字列を作成し、
前記第2のデータ集合体以外のメンバ及び前記第1の文字列の少なくとも何れかを、第2の配列の一個以上の要素に格納する処理を含み、
前記文字列作成処理は、
前記第2の配列の一個以上の要素に格納されたデータ及び第2の区切り文字を含んだ文字列を作成する処理を含む
請求項1に記載のプログラム。
The array creation process includes
When the data aggregate includes a second data aggregate, the data stored in one or more members included in the second data aggregate is stored in one or more elements of the first array. ,
Creating a first character string including data stored in one or more elements of the first array and a first delimiter;
Storing at least one of a member other than the second data aggregate and the first character string in one or more elements of a second array,
The character string creation process includes:
The program according to claim 1, further comprising a process of creating a character string including data stored in one or more elements of the second array and a second delimiter.
配列のいずれの要素にも含まれていない文字を、データの区切りを示す区切り文字として特定し、
前記配列の一個以上の要素に格納されているデータを、特定した区切り文字を境にして連結し、
区切り文字を境にして連結したデータを含み、所定の位置に前記区切り文字を含んだ文字列を作成する
処理を情報処理装置に実行させるプログラム。
Identify characters that are not included in any element of the array as delimiters that indicate data delimiters,
Concatenating data stored in one or more elements of the array with a specified delimiter as a boundary,
A program that causes an information processing apparatus to execute processing for creating a character string that includes data concatenated with a delimiter as a boundary and includes the delimiter at a predetermined position.
文字列の中から、該文字列中の文字の位置に基づいて、データの区切りを示す区切り文字を特定し、
特定した区切り文字に基づいて、前記文字列を0個以上のデータへ変換し、一個以上のデータを配列の一個以上の要素に格納し、
前記配列の一個以上の要素に格納されたデータを、データ集合体の一個以上のメンバに格納する
処理を情報処理装置に実行させるプログラム。
From the character string, based on the position of the character in the character string, specify a delimiter that indicates the data delimiter,
Based on the specified delimiter, the character string is converted into zero or more data, one or more data is stored in one or more elements of the array,
A program for causing an information processing apparatus to execute processing for storing data stored in one or more elements of the array in one or more members of a data aggregate.
第1情報処理装置及び第2情報処理装置を通信網で接続した情報処理システムであって、
前記第1情報処理装置は、
データ集合体に含まれる一個以上のメンバに格納されたデータを、予め定められている対応関係に従って、配列の一個以上の要素に格納する第1配列作成部と、
前記配列の一個以上の要素に格納されたデータ及びデータの区切りを示す区切り文字を含んだ文字列を作成する文字列作成部と、
該文字列作成部が作成した文字列を出力する出力部とを備え、
前記第2情報処理装置は、
前記データ集合体の一個以上のメンバと前記配列の一個以上の要素との間の前記対応関係を前記第1情報処理装置と共有しており、
前記出力部が出力した文字列を取得する取得部と、
該取得部で取得した文字列を、前記区切り文字に基づいて0個以上のデータへ変換し、一個以上のデータを配列の一個以上の要素に格納する第2配列作成部と、
前記配列の一個以上の要素に格納されたデータを、前記対応関係に従って、データ集合体に含まれる一個以上のメンバに格納するデータ集合体作成部とを備える
情報処理システム。
An information processing system in which a first information processing device and a second information processing device are connected via a communication network,
The first information processing apparatus
A first array creation unit that stores data stored in one or more members included in the data aggregate in one or more elements of the array in accordance with a predetermined correspondence;
A character string creation unit that creates a character string including data stored in one or more elements of the array and a delimiter indicating a delimiter of the data;
An output unit for outputting the character string created by the character string creating unit,
The second information processing apparatus
Sharing the correspondence between one or more members of the data aggregate and one or more elements of the array with the first information processing apparatus;
An acquisition unit for acquiring the character string output by the output unit;
A second array creating unit that converts the character string obtained by the obtaining unit into zero or more data based on the delimiter and stores one or more data in one or more elements of the array;
An information processing system comprising: a data aggregate creation unit that stores data stored in one or more elements of the array in one or more members included in a data aggregate according to the correspondence relationship.
前記第1配列作成部は、
前記データ集合体に第2のデータ集合体が含まれる場合に、該第2のデータ集合体に含まれる一個以上のメンバに格納されたデータを、第1の配列の一個以上の要素に格納し、
前記第1の配列の一個以上の要素に格納されたデータ及び第1の区切り文字を含んだ第1の文字列を作成し、
前記第2のデータ集合体以外のメンバ及び前記第1の文字列の少なくとも何れかを、第2の配列の一個以上の要素に格納し、
前記文字列作成部は、
前記第2の配列の一個以上の要素に格納されたデータ及び第2の区切り文字を含んだ第2の文字列を作成する
請求項5に記載の情報処理システム。
The first array creation unit includes:
When the data aggregate includes a second data aggregate, the data stored in one or more members included in the second data aggregate is stored in one or more elements of the first array. ,
Creating a first character string including data stored in one or more elements of the first array and a first delimiter;
Storing at least one of members other than the second data aggregate and the first character string in one or more elements of the second array;
The character string creating unit
The information processing system according to claim 5, wherein a second character string including data stored in one or more elements of the second array and a second delimiter is created.
JP2017096262A 2016-07-22 2017-05-15 Program and information processing system Active JP6511598B2 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2016144646 2016-07-22
JP2016144646 2016-07-22

Publications (2)

Publication Number Publication Date
JP2018022472A true JP2018022472A (en) 2018-02-08
JP6511598B2 JP6511598B2 (en) 2019-05-15

Family

ID=61166165

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2017096262A Active JP6511598B2 (en) 2016-07-22 2017-05-15 Program and information processing system

Country Status (1)

Country Link
JP (1) JP6511598B2 (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007114972A (en) * 2005-10-19 2007-05-10 Fujitsu Ltd Data processing method of structured document, data processing program and data processor
JP2007233630A (en) * 2006-02-28 2007-09-13 Fujitsu Ltd Browser screen-display device, and program for the same
JP2010262450A (en) * 2009-05-01 2010-11-18 Brother Ind Ltd Display

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007114972A (en) * 2005-10-19 2007-05-10 Fujitsu Ltd Data processing method of structured document, data processing program and data processor
JP2007233630A (en) * 2006-02-28 2007-09-13 Fujitsu Ltd Browser screen-display device, and program for the same
JP2010262450A (en) * 2009-05-01 2010-11-18 Brother Ind Ltd Display

Also Published As

Publication number Publication date
JP6511598B2 (en) 2019-05-15

Similar Documents

Publication Publication Date Title
US20190188417A1 (en) Data masking systems and methods
JP2020170551A (en) Information processing device and information processing method
CN108304201A (en) Object updating method, device and equipment
CN111427559B (en) Method for realizing form customization service, method, device and system for generating form
US20120330598A1 (en) Method, program, and system for generating test cases
JP5939123B2 (en) Execution control program, execution control method, and information processing apparatus
CN105094924B (en) The introduction method and device of image file
CN110532182B (en) Automatic testing method and device for virtualization platform
JP2008541286A (en) Method and apparatus for generating a parametric model related to a three-dimensional shape
Daverio et al. Latfield2: A c++ library for classical lattice field theory
CN112085166A (en) Convolutional neural network model accelerated training method and device, electronic equipment and storage medium
Ballamudi et al. Getting Started Modern Web Development with Next. js: An Indispensable React Framework
KR20040090937A (en) Modeling directed scale-free object relationships
WO2021220774A1 (en) System for generating compound structure representation
CN107391528A (en) Front end assemblies Dependency Specification searching method and equipment
JPWO2009113483A1 (en) Access control system, access control method, and storage medium
CN104050207B (en) Information processing unit and file management system
US20230068272A1 (en) Information processing apparatus, information processing method, and storage medium for classifying object of interest
JP2018022472A (en) Program and information processing system
Möller et al. : A cross-platform programming framework for quantum-accelerated scientific computing
Sánchez-Expósito et al. Web services as building blocks for science gateways in astrophysics
US20200089475A1 (en) Optimization problem arithmetic method and optimization problem arithmetic apparatus
JP5428316B2 (en) Identifier shortening display program, identifier shortening display device, and identifier shortening display method
Robertsén et al. Designing a graphics processing unit accelerated petaflop capable lattice Boltzmann solver: Read aligned data layouts and asynchronous communication
JP6971271B2 (en) Information processing equipment, information processing methods and information processing programs

Legal Events

Date Code Title Description
A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20180807

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20180925

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20190312

R150 Certificate of patent or registration of utility model

Ref document number: 6511598

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250