OpenStructure
|
#include <info_handle.hh>
Public Member Functions | |
InfoHandle () | |
InfoHandle | Copy () const |
void | Import (const String &file) |
void | Export (const String &file) const |
bool | IsValid () const |
InfoGroup | Root () const |
void | AddDefault (const InfoHandle &h) |
bool | HasDefaultGroup (const InfoPath &p) const |
InfoGroup | GetDefaultGroup (const InfoPath &p) const |
bool | HasDefaultItem (const InfoPath &p) const |
InfoItem | GetDefaultItem (const InfoPath &p) const |
InfoGroup | GetParent () const |
void | SetName (const String &name) |
String | GetName () const |
InfoGroup | GetGroup (const InfoPath &path, bool use_defaults=true) const |
InfoGroup | CreateGroup (const String &name) |
bool | HasGroup (const InfoPath &name, bool use_defaults=true) const |
InfoGroup | RetrieveGroup (const InfoPath &path, bool use_defaults=true) |
InfoItem | GetItem (const InfoPath &path, bool use_defaults=true) const |
InfoItem | CreateItem (const String &name, const String &value) |
bool | HasItem (const InfoPath &path, bool use_defaults=true) const |
InfoItem | RetrieveItem (const InfoPath &path, bool use_defaults=true) |
void | Remove (const InfoPath &path, bool remove_defaults=false) |
void | Remove (const InfoGroup &group) |
String | GetAttribute (const String &name) const |
void | SetAttribute (const String &name, const String &value) |
bool | HasAttribute (const String &name) const |
void | RemoveAttribute (const String &name) |
std::vector< String > | GetAttributeList () const |
String | GetTextData () const |
void | SetTextData (const String &td) |
void | Apply (InfoVisitor &v, bool visit_this=true) |
void | Apply (InfoConstVisitor &v, bool visit_this=true) const |
Friends | |
InfoHandle | CreateInfo () |
InfoHandle | CreateInfo (const String &text) |
InfoHandle | LoadInfo (const String &) |
main info handle
following the handle concept, this class represents a thin wrapper to an underlying info class, which is shared among copies of InfoHandles unless the Copy() method is used.
Definition at line 54 of file info_handle.hh.
InfoHandle | ( | ) |
empty, ie invalid handle
void AddDefault | ( | const InfoHandle & | h | ) |
void Apply | ( | InfoConstVisitor & | v, |
bool | visit_this = true |
||
) | const |
void Apply | ( | InfoVisitor & | v, |
bool | visit_this = true |
||
) |
InfoHandle Copy | ( | ) | const |
return clone of the underlying representation
void Export | ( | const String & | file | ) | const |
write content to file
std::vector<String> GetAttributeList | ( | ) | const |
String GetName | ( | ) | const |
InfoGroup GetParent | ( | ) | const |
group interface
String GetTextData | ( | ) | const |
bool HasAttribute | ( | const String & | name | ) | const |
bool HasDefaultGroup | ( | const InfoPath & | p | ) | const |
bool HasDefaultItem | ( | const InfoPath & | p | ) | const |
bool HasGroup | ( | const InfoPath & | name, |
bool | use_defaults = true |
||
) | const |
bool HasItem | ( | const InfoPath & | path, |
bool | use_defaults = true |
||
) | const |
void Import | ( | const String & | file | ) |
generate info from file
bool IsValid | ( | ) | const |
void Remove | ( | const InfoGroup & | group | ) |
void Remove | ( | const InfoPath & | path, |
bool | remove_defaults = false |
||
) |
void RemoveAttribute | ( | const String & | name | ) |
InfoGroup Root | ( | ) | const |
void SetName | ( | const String & | name | ) |
void SetTextData | ( | const String & | td | ) |
|
friend |
Create InfoHandle from scratch.
|
friend |
|
friend |
Load InfoHandle from a file.