Clarisse 5.0 SP10 SDK 5.0.5.10.0
Loading...
Searching...
No Matches
ParserGroup Class Reference

Serialization node, which contains other groups to create a hierarchy or ParseEntries for data. More...

#include <parser_group.h>

Public Member Functions

 ParserGroup (const CoreString &name)
 Constructor.
 
 ParserGroup (const ParserGroup &group)
 Copy Constructor.
 
virtual ~ParserGroup ()
 Destructor.
 
ParserEntryadd_entry (const CoreString &name, const unsigned long &line=0, const unsigned long &column=0)
 Adds a new entry.
 
ParserEntryadd_entry (const ParserEntry &entry)
 Adds the specified entry to this group. More...
 
ParserGroupadd_group (const CoreString &name)
 Adds a new group.
 
ParserGroupadd_group (ParserGroup *group)
 Adds a group.
 
void move_entry (const unsigned int &from, const unsigned int &to)
 Move an entry rank in the same group. More...
 
void move_entry (const unsigned int &index, ParserGroup &group)
 Move an entry from its group to the specified one. More...
 
void detach_entry (const unsigned int &index)
 
void move_entries (ParserGroup &group)
 Move all entries into the specified group. More...
 
void move_entries (ParserGroup &group, unsigned int index)
 Move all entries into the specified group. More...
 
void remove_entry (const CoreString &name)
 remove the entries from this group More...
 
void remove_entry (unsigned int index)
 remove the entry from the group at the given index More...
 
void remove_entries (CoreBasicArray< unsigned int > indices)
 remove the entries from the group at the given indices More...
 
const CoreStringget_name () const
 
unsigned int get_entry_count () const
 Gets number of entries.
 
ParserEntryget_entry (const unsigned int &index) const
 Gets entry at specified index.
 
ParserEntryget_entry (const CoreString &entry_name) const
 
CoreVector< ParserEntry * > get_entries (const CoreString &entry_name, bool recursive=false) const
 get all the entries in the group matching the given name More...
 
const CoreVector< ParserEntry * > & get_entries () const
 
ParserEntryget_keyword (const CoreString &name) const
 
void get_text (CoreString &text, const bool &with_header, const bool &multiline=true, const unsigned int &offset=1) const
 
bool set_text (const CoreString &text, const CoreVersion &serial_version=default_parser_serial_version, AppProgressBar *progress_bar=0)
 
void get_encrypted_text (CoreArray< unsigned char > &buffer, const CoreString &key, const bool &with_header, const bool &multiline=true, const unsigned int &offset=1) const
 
bool set_encrypted_text (const CoreArray< unsigned char > &buffer, const CoreString &key)
 
void get_encrypted_text (CoreString &text, const CoreString &key, const bool &with_header, const bool &multiline=true, const unsigned int &offset=1) const
 
bool set_encrypted_text (const CoreString &text, const CoreString &key)
 
void set_source_entry (ParserEntry *entry)
 
const ParserEntryget_source_entry () const
 
CoreVector< char > get_binary (const bool &named) const
 
bool set_binary (const CoreVector< char > &buffer, long unsigned long &position)
 
unsigned int get_first_entry_index (ParserEntry::Type type)
 
void set (const ParserGroup &group)
 Replace this by the group specified in parameter. The group name gets also renamed.
 
void clear ()
 

Friends

struct ParserImpl
 
CoreLogStreamoperator<< (CoreLogStream &stream, const ParserGroup &group)
 

Detailed Description

Serialization node, which contains other groups to create a hierarchy or ParseEntries for data.

Member Function Documentation

◆ add_entry()

ParserEntry * ParserGroup::add_entry ( const ParserEntry entry)

Adds the specified entry to this group.

Note
This group will manage releasing.
Take care on usage : 'entry' parameter adress is stored for later usage.

◆ get_entries()

CoreVector< ParserEntry * > ParserGroup::get_entries ( const CoreString entry_name,
bool  recursive = false 
) const

get all the entries in the group matching the given name

Parameters
entry_namethe name of the entries to gather
recursiveif true, the entries in all the children groups matching the given name are also gathered

◆ get_first_entry_index()

unsigned int ParserGroup::get_first_entry_index ( ParserEntry::Type  type)

Return the index of the first occurrence of the entry of the given type

◆ move_entries() [1/2]

void ParserGroup::move_entries ( ParserGroup group)

Move all entries into the specified group.

Parameters
groupreceiving the entries

◆ move_entries() [2/2]

void ParserGroup::move_entries ( ParserGroup group,
unsigned int  index 
)

Move all entries into the specified group.

Parameters
groupreceiving the entries
indexstart index from which to insert the entries in group

◆ move_entry() [1/2]

void ParserGroup::move_entry ( const unsigned int &  from,
const unsigned int &  to 
)

Move an entry rank in the same group.

Parameters
indexof the entry
newindex of the entry

◆ move_entry() [2/2]

void ParserGroup::move_entry ( const unsigned int &  index,
ParserGroup group 
)

Move an entry from its group to the specified one.

Parameters
indexof the entry in this group
groupreceiving the entry

◆ remove_entries()

void ParserGroup::remove_entries ( CoreBasicArray< unsigned int >  indices)

remove the entries from the group at the given indices

Parameters
indicesthe indices of the entries in the group
Note
the entries are deleted

◆ remove_entry() [1/2]

void ParserGroup::remove_entry ( const CoreString name)

remove the entries from this group

Parameters
namethe name of the entries to remove
Note
the entries are deleted

◆ remove_entry() [2/2]

void ParserGroup::remove_entry ( unsigned int  index)

remove the entry from the group at the given index

Parameters
indexthe index of the entry in the group
Note
the entries are deleted