/* * Copyright (C) 2005 ? All rights reserved. * @(#) $Id$ * @date 2005/03/18 * @date 2005/09/09 * @author morino */ #ifndef __PROPERTIES_H__ #define __PROPERTIES_H__ #include #include using std::string; using std::map; class Properties { public: Properties(); public: long parse(const char* filename); bool exists(const string& key); string getProperty(string& key); long setProperty(string& key, string& value); long setProperty(string& key, int value); string toString() const; string& operator[](const string& key); public: typedef std::map properties_t; typedef std::pair property_t; typedef std::string::iterator str_iterator_t; typedef properties_t::iterator map_iterator_t; protected: properties_t _properties; }; #endif