class QPanda::OriginCollection

Overview

Origin Collection A relatively free data collection class for saving data. More...

Detailed Documentation

Origin Collection A relatively free data collection class for saving data.

Parameters:

number The num of key

Construction

Construct a new Origin Collection object.

Construct a new Origin Collection Construct a new Origin Collection by file_path.

Parameters:

file_path File path

Construct a new Origin Collection object by other Origin Collection.

Parameters:

old target OriginCollection

Methods

add value Assign a value to the specified key

Parameters:

T value type
value_name Key name
num Key position in json
value key value

add value Assign a value to the specified key

Parameters:

T value type
value_name Key name
num Key position in json
value key value

add value Assign a value to the specified key

Parameters:

T value type
value_name Key name
num Key position in json
value key value

add value Set the value corresponding to the key

Parameters:

value_name Key name
num Key position in json
value Key value

add value Set the value corresponding to the key

Parameters:

value_name Key name
num Key position in json
value Key value

operator= Set the key of the object

Parameters:

args arg list Key list

Returns:

OriginCollection &

operator= Set the key of the object

Parameters:

args arg list Key list

Returns:

OriginCollection &

operator= by other OriginCollection

Parameters:

old target OriginCollection

Returns:

OriginCollection &

Set the Value set value list by key.

Parameters:

T args type
name key name
args value array

Set the Value set value list by key.

Parameters:

name key name
args value array

Set the Value set value list by key.

Parameters:

name key name
args value array

Set the Value set vector<T> value by key.

Parameters:

T args type
name key name
args value array

insert value Set the value of other properties by the value of the primary key

Parameters:

ARG Variable length parameter tparam
key Key value
arg the value of other properties

insert value Set the value of other properties by the value of the primary key

Parameters:

ARG Variable length parameter tparam
key Key value
arg the value of other properties

Get value by Key.

Parameters:

name Key name

Returns:

std::vector<std::string> value vector

Get value by primary Key value.

Parameters:

key_value primary Key value

Returns:

std::string

Get value by primary Key value.

Parameters:

key_value primary Key value

Returns:

std::string

open Read the json file of the specified path

Parameters:

file_name file path

Returns:

true open success

false open fail

write Write json file

Returns:

true Write success

false Write fail

Get the Json String Get object json string.

Returns:

std::string

Get the File Path.

Returns:

std::string