OBTConfigurationTree.h

Go to the documentation of this file.
00001 #ifndef OBTConfigurationTree_H
00002 #define OBTConfigurationTree_H
00003 
00004 #include "OBTConfigurationItem.h"
00005 #include "OBTSingleton.h"
00006 
00007 namespace OBT
00008 {
00018         class OBT_API ConfigurationTree
00019         {
00020         public:
00021 
00022                 friend class Singleton< ConfigurationTree > ;
00023                 friend class AbstractConfigurationFileParser ;
00024 
00029                 const ConfigurationItem& getRoot() const ;
00030 
00035                 void addChild( const ConfigurationItem& child ) ;
00036 
00037         private:
00038 
00042                 ConfigurationTree() ;
00043 
00047                 ConfigurationTree( const ConfigurationTree& ConfigurationTree ) ;
00048 
00052                 const ConfigurationTree& operator=( const ConfigurationTree& ConfigurationTree ) ;
00053 
00057                 virtual ~ConfigurationTree() ;
00058 
00063                 ConfigurationItem& touchRoot() ;
00064 
00066                 ConfigurationItem _parametersRoot ;
00067         } ;
00068 
00069         template class OBT_API Singleton< ConfigurationTree > ;
00070 
00071         //-------------------------------------------------------------------------
00072         // getRoot
00073         //-------------------------------------------------------------------------
00074         inline const ConfigurationItem& 
00075                 ConfigurationTree::getRoot() const
00076         {
00077                 return _parametersRoot ;
00078         }
00079 
00080         //-------------------------------------------------------------------------
00081         // addChild
00082         //-------------------------------------------------------------------------
00083         inline void 
00084                 ConfigurationTree::addChild( const ConfigurationItem& child )
00085         {
00086                 _parametersRoot.addChild( child ) ;
00087         }
00088 
00089         //-------------------------------------------------------------------------
00090         // touchRoot
00091         //-------------------------------------------------------------------------
00092         inline ConfigurationItem& 
00093                 ConfigurationTree::touchRoot()
00094         {
00095                 return _parametersRoot ;
00096         }
00097 }
00098 #endif //header

Generated on Wed Oct 1 11:34:05 2008 for OBT by  doxygen 1.5.3