OpenStructure
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

◆ InfoHandle()

empty, ie invalid handle

Member Function Documentation

◆ AddDefault()

void AddDefault ( const InfoHandle h)

◆ Apply() [1/2]

void Apply ( InfoConstVisitor v,
bool  visit_this = true 
) const

◆ Apply() [2/2]

void Apply ( InfoVisitor v,
bool  visit_this = true 
)

◆ Copy()

InfoHandle Copy ( ) const

return clone of the underlying representation

◆ CreateGroup()

InfoGroup CreateGroup ( const String name)

◆ CreateItem()

InfoItem CreateItem ( const String name,
const String value 
)

◆ Export()

void Export ( const String file) const

write content to file

◆ GetAttribute()

String GetAttribute ( const String name) const

◆ GetAttributeList()

std::vector<String> GetAttributeList ( ) const

◆ GetDefaultGroup()

InfoGroup GetDefaultGroup ( const InfoPath p) const

◆ GetDefaultItem()

InfoItem GetDefaultItem ( const InfoPath p) const

◆ GetGroup()

InfoGroup GetGroup ( const InfoPath path,
bool  use_defaults = true 
) const

◆ GetItem()

InfoItem GetItem ( const InfoPath path,
bool  use_defaults = true 
) const

◆ GetName()

String GetName ( ) const

◆ GetParent()

InfoGroup GetParent ( ) const

group interface

◆ GetTextData()

String GetTextData ( ) const

◆ HasAttribute()

bool HasAttribute ( const String name) const

◆ HasDefaultGroup()

bool HasDefaultGroup ( const InfoPath p) const

◆ HasDefaultItem()

bool HasDefaultItem ( const InfoPath p) const

◆ HasGroup()

bool HasGroup ( const InfoPath name,
bool  use_defaults = true 
) const

◆ HasItem()

bool HasItem ( const InfoPath path,
bool  use_defaults = true 
) const

◆ Import()

void Import ( const String file)

generate info from file

◆ IsValid()

bool IsValid ( ) const

◆ Remove() [1/2]

void Remove ( const InfoGroup group)

◆ Remove() [2/2]

void Remove ( const InfoPath path,
bool  remove_defaults = false 
)

◆ RemoveAttribute()

void RemoveAttribute ( const String name)

◆ RetrieveGroup()

InfoGroup RetrieveGroup ( const InfoPath path,
bool  use_defaults = true 
)

◆ RetrieveItem()

InfoItem RetrieveItem ( const InfoPath path,
bool  use_defaults = true 
)

◆ Root()

InfoGroup Root ( ) const

◆ SetAttribute()

void SetAttribute ( const String name,
const String value 
)

◆ SetName()

void SetName ( const String name)

◆ SetTextData()

void SetTextData ( const String td)

Friends And Related Function Documentation

◆ CreateInfo [1/2]

InfoHandle CreateInfo ( )
friend

Create InfoHandle from scratch.

◆ CreateInfo [2/2]

InfoHandle CreateInfo ( const String text)
friend

◆ LoadInfo

InfoHandle LoadInfo ( const String )
friend

Load InfoHandle from a file.


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