Properties.h

Aller à la documentation de ce fichier.
00001 // ==========================================================================
00002 // Copyright(c)'1999-2000 by APACHE Team
00003 // Author: T. Gautier
00004 // ==========================================================================
00009 #ifndef _SAPPE_PROPERTIES_H_
00010 #define _SAPPE_PROPERTIES_H_
00011 
00012 #include <fstream>
00013 #include <string>
00014 #include <map>
00015 
00016 
00017 
00021 class Properties {
00022 public:
00023 
00025   Properties();
00026 
00028   virtual ~Properties();
00029 
00031   virtual 
00032   void load( const std::string& filename );
00033 
00035   virtual 
00036   void store( const std::string& filename, 
00037               const std::string& header = "" ) const;
00038 
00040   virtual void print( std::ostream& ) const;
00041 
00043   std::string& operator[]( const std::string& key);
00044 
00046   const std::string& operator[]( const std::string& key) const;
00047 
00048   //@name Iterator over the couple <key,value>
00050   typedef std::map<std::string,std::string>::iterator Iterator;
00051   typedef std::map<std::string,std::string>::const_iterator constIterator;
00053   Iterator begin() { return _map.begin(); }
00055   Iterator end() { return _map.end(); }
00057   constIterator begin() const { return _map.begin(); }
00059   constIterator end() const { return _map.end(); }
00061   
00062 protected:  
00063   std::map<std::string,std::string> _map;
00064 };
00065 
00066 
00067 #endif // TAK_PROPERTY 

Généré le Thu Jan 24 19:11:42 2008 pour Animation 3D par  doxygen 1.5.1