--- trunk/OOPSE-4/src/utils/PropertyMap.hpp 2004/10/13 22:28:51 1566 +++ trunk/OOPSE-4/src/utils/PropertyMap.hpp 2004/10/20 22:54:30 1622 @@ -38,93 +38,93 @@ #include #include -#include +#include namespace oopse{ - /** - * @class PropertyMap - * PropertyMap class maintains a list of GenericData. Type of Property is actually GenericData. - */ - class PropertyMap{ - public: - - /** trivial constructor */ - PropertyMap(); + /** + * @class PropertyMap + * PropertyMap class maintains a list of GenericData. Type of Property is actually GenericData. + */ + class PropertyMap{ + public: - /** - * Virtual Destructor responsible for deleting all of the generc data in PropertyMap - */ - virtual ~PropertyMap(); + /** trivial constructor */ + PropertyMap() {} - /** - * Adds property into property map - * - * @param genData GenericData to be added into PropertyMap - * - * @see #removeProperty - * @see #clearProperties - */ - void addProperty(GenericData* genData); + /** + * Virtual Destructor responsible for deleting all of the generc data in PropertyMap + */ + virtual ~PropertyMap(); - /** - * Removes property from PropertyMap by name - * - * @param propName the name of property to be removed - * - * @see #addProperty - * @see #clearProperties - */ - void removeProperty(std::string& propName); + /** + * Adds property into property map + * + * @param genData GenericData to be added into PropertyMap + * + * @see #removeProperty + * @see #clearProperties + */ + void addProperty(GenericData* genData); - /** - * clear all of the properties - * - * @see #addProperty - * @see #removeProperty - */ - void clearProperties(); + /** + * Removes property from PropertyMap by name + * + * @param propName the name of property to be removed + * + * @see #addProperty + * @see #clearProperties + */ + bool removeProperty(const std::string& propName); - /** - * Returns all names of properties - * - * @return all names of properties - */ - std::vector getPropertyNames(); + /** + * clear all of the properties + * + * @see #addProperty + * @see #removeProperty + */ + void clearProperties(); - /** - * Returns all of the properties in PropertyMap - * - * @return all of the properties in PropertyMap - * - * @see #getPropertyByName - */ - std::vector getProperties(); + /** + * Returns all names of properties + * + * @return all names of properties + */ + std::vector getPropertyNames(); - /** - * Returns property - * - * @param propName name of property - * - * @return a pointer point to property with propName. If no property named propName - * exists, return NULL - * - * @see #getProperties - */ - GenericData* getPropertyByName(std:string& propName); - template T getPropertyByName(std:string& propName); - - protected: - std::map propMap_; + /** + * Returns all of the properties in PropertyMap + * + * @return all of the properties in PropertyMap + * + * @see #getPropertyByName + */ + std::vector getProperties(); - private: + /** + * Returns property + * + * @param propName name of property + * + * @return a pointer point to property with propName. If no property named propName + * exists, return NULL + * + * @see #getProperties + */ + GenericData* getPropertyByName(const std::string& propName); + //template T getPropertyByName(std:string& propName); - /** prevent copy constructing */ - PropertyMap(const PropertyMap&); + protected: + std::map propMap_; - /** prevent copy assignment */ - PropertyMap& operator=(const PropertyMap&); - }; + private: + /** prevent copy constructing */ + PropertyMap(const PropertyMap&); + + /** prevent copy assignment */ + PropertyMap& operator=(const PropertyMap&); + }; + }// namespace oopse #endif //UTIL_PROPERTYMAP_HPP \ No newline at end of file