Generate tag file & add docs to pipropertystorage.h

git-svn-id: svn://db.shs.com.ru/pip@829 12ceb7fc-bf1f-11e4-8940-5bc7170c53b5
This commit is contained in:
2 changed files with 2615 additions and 2505 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -27,10 +27,18 @@
#include "pivariant.h"
/**
* @brief Key-value storage, based on PIVector with PIPropertyStorage::Property elements. Each element in vector
* contains unique name and you can identify property by name with propertyValueByName(), propertyByName().
* You can add property using addProperty().
*/
class PIPropertyStorage {
public:
PIPropertyStorage() {}
/**
* @brief PIPropertyStorage element.
*/
struct Property {
Property(const PIString & n = PIString(), const PIString & c = PIString(), const PIVariant & v = PIVariant(), int f = 0):
name(n), comment(c), value(v), flags(f) {}
@@ -78,10 +86,45 @@ public:
void removeProperty(const PIString & _name);
void removePropertiesByFlag(int flag);
void updateProperties(const PIVector<Property> & properties_, int flag_ignore = 0);
/**
* @brief Search property by name and return it.
*
* @param name of property
* @return property value or default constructed Property
*/
Property propertyByName(const PIString & name) const;
/**
* @brief Search property by name and return property value.
*
* @param name of property
* @return property value or invalid PIVariant if name unknown
*/
PIVariant propertyValueByName(const PIString & name) const;
/**
* @brief Set value of property with specific name if name is present in storage.
*
* @param name of property to set value
* @param value to set
*/
void setPropertyValue(const PIString & name, const PIVariant & value);
/**
* @brief Set comment of property with specific name if name is present in storage.
*
* @param name of property to set comment
* @param comment to set
*/
void setPropertyComment(const PIString & name, const PIString & comment);
/**
* @brief Set flags of property with specific name if name is present in storage.
*
* @param name of property to set flags
* @param flags to set
*/
void setPropertyFlags(const PIString & name, int flags);
PIPropertyStorage & operator <<(const PIPropertyStorage::Property & p) {props << p; return *this;}