OpenStructure
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Member Functions | Friends
InfoHandle Class Reference

#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< StringGetAttributeList () 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 &)
 

Detailed Description

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.

Constructor & Destructor Documentation

empty, ie invalid handle

Member Function Documentation

void AddDefault ( const InfoHandle h)
void Apply ( InfoVisitor v,
bool  visit_this = true 
)
void Apply ( InfoConstVisitor v,
bool  visit_this = true 
) const
InfoHandle Copy ( ) const

return clone of the underlying representation

InfoGroup CreateGroup ( const String name)
InfoItem CreateItem ( const String name,
const String value 
)
void Export ( const String file) const

write content to file

String GetAttribute ( const String name) const
std::vector<String> GetAttributeList ( ) const
InfoGroup GetDefaultGroup ( const InfoPath p) const
InfoItem GetDefaultItem ( const InfoPath p) const
InfoGroup GetGroup ( const InfoPath path,
bool  use_defaults = true 
) const
InfoItem GetItem ( const InfoPath path,
bool  use_defaults = true 
) 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 InfoPath path,
bool  remove_defaults = false 
)
void Remove ( const InfoGroup group)
void RemoveAttribute ( const String name)
InfoGroup RetrieveGroup ( const InfoPath path,
bool  use_defaults = true 
)
InfoItem RetrieveItem ( const InfoPath path,
bool  use_defaults = true 
)
InfoGroup Root ( ) const
void SetAttribute ( const String name,
const String value 
)
void SetName ( const String name)
void SetTextData ( const String td)

Friends And Related Function Documentation

InfoHandle CreateInfo ( )
friend

Create InfoHandle from scratch.

InfoHandle CreateInfo ( const String text)
friend
InfoHandle LoadInfo ( const String )
friend

Load InfoHandle from a file.


The documentation for this class was generated from the following file: