#include <secstwo_internal.hpp>
Public Types | |
typedef type_selector < e_list_t >::data_type | data_t |
typedef type_selector < e_list_t >::print_type | print_t |
typedef type_selector < e_list_t >::container_type | container_t |
Public Member Functions | |
list_item_t (const char *name) | |
virtual data_type_t | type () const |
Returns data item type. | |
virtual data_item_t & | operator[] (uint32_t ix) |
Array access operator by index There are two main cases for this operator: 1. Access to the element of a list data item 2. Access to the elements in a numeric item body If the index goes beyond the item size, the ref to the item itself is returned. One is strongly encouraged to use. | |
virtual data_item_t & | operator[] (const char *key) |
Array access operator by name (the one given to the item upon construction) This works only for list data item and call pull up the result from any indentation level, ex. the list contains another list containing named item. | |
data_item_t & | operator+= (const pdata_item_t &pit) |
virtual uint32_t | size () const |
Size calc function override for list. As per SEMI E5, section 9.3, the list size is counted by the number of elements, not by the number of bytes. | |
virtual bool | variable () const |
virtual void | print (std::ostream &os, const char *prefix) const |
Prints the item in human-readable format. | |
virtual size_t | raw_size () const |
Returns number of bytes the item occupies in binary format. | |
virtual bool | match (const data_item_t &other, match_t kind=ALL) const |
Function to match a given data item to another data item. | |
virtual pdata_item_t | clone () const |
Creates a copy of the message. Calls data item copy constructor and puts newly returned data item into a shared ptr. Contrary to cloning shared ptrs with ref count on a message is incremented, cloned message is a separate one and it's data can be edited with no impact to the nacestor data item. | |
virtual void | clear_data () |
Clears all data in a data item. | |
virtual int | copy_data (const data_item_t &o) |
Copies all data from the given item. Data copy is made if data items have same type. For list item copy data is made reqursively and does not stop upon unsuccesful data copy. | |
Protected Attributes | |
container_t | _data |
Friends | |
class | binary_deserializer_t |
class | xml_deserializer_t |
class | binary_serializer_t |
class | xml_serializer_t |
Classes | |
struct | match_name |
Definition at line 559 of file secstwo_internal.hpp.
virtual data_type_t freesecs::secstwo::list_item_t::type | ( | ) | const [inline, virtual] |
Returns data item type.
Reimplemented from freesecs::secstwo::data_item_t.
Definition at line 570 of file secstwo_internal.hpp.
Referenced by match().
virtual data_item_t& freesecs::secstwo::list_item_t::operator[] | ( | uint32_t | ix | ) | [inline, virtual] |
Array access operator by index There are two main cases for this operator: 1. Access to the element of a list data item 2. Access to the elements in a numeric item body If the index goes beyond the item size, the ref to the item itself is returned. One is strongly encouraged to use.
ix | access index |
Reimplemented from freesecs::secstwo::data_item_t.
Reimplemented in freesecs::secstwo::var_list_item_t.
Definition at line 571 of file secstwo_internal.hpp.
Referenced by freesecs::secstwo::var_list_item_t::operator[]().
virtual data_item_t& freesecs::secstwo::list_item_t::operator[] | ( | const char * | name | ) | [inline, virtual] |
Array access operator by name (the one given to the item upon construction) This works only for list data item and call pull up the result from any indentation level, ex. the list contains another list containing named item.
name | Name of the wanted item. |
Reimplemented from freesecs::secstwo::data_item_t.
Definition at line 580 of file secstwo_internal.hpp.
virtual bool freesecs::secstwo::list_item_t::match | ( | const data_item_t & | it, | |
match_t | match = ALL | |||
) | const [inline, virtual] |
Function to match a given data item to another data item.
it | Item to match. | |
match | Token of kind of match. |
Reimplemented from freesecs::secstwo::data_item_t.
Reimplemented in freesecs::secstwo::var_list_item_t.
Definition at line 647 of file secstwo_internal.hpp.
References _data, type(), and freesecs::secstwo::data_item_t::type().
Referenced by freesecs::secstwo::var_list_item_t::match().
virtual int freesecs::secstwo::list_item_t::copy_data | ( | const data_item_t & | ) | [inline, virtual] |
Copies all data from the given item. Data copy is made if data items have same type. For list item copy data is made reqursively and does not stop upon unsuccesful data copy.
0 | Data copy successful | |
< | 0 Data copy performed with errors |
Reimplemented from freesecs::secstwo::data_item_t.
Reimplemented in freesecs::secstwo::var_list_item_t.
Definition at line 695 of file secstwo_internal.hpp.
References _data, and freesecs::secstwo::data_item_t::type().