Fledge
An open source edge computing platform for industrial users
ConfigCategory::CategoryItem Class Reference

Public Member Functions

 CategoryItem (const std::string &name, const rapidjson::Value &item)
 
 CategoryItem (const std::string &name, const std::string &description, const std::string &type, const std::string def, const std::string &value)
 
 CategoryItem (const std::string &name, const std::string &description, const std::string def, const std::string &value, const std::vector< std::string > options)
 
 CategoryItem (const CategoryItem &rhs)
 Copy constructor for configuration item.
 
std::string toJSON (const bool full=false) const
 Create a JSON representation of the configuration item. More...
 
std::string defaultToJSON () const
 Return only "default" item values. More...
 

Public Attributes

std::string m_name
 
std::string m_displayName
 
std::string m_type
 
std::string m_default
 
std::string m_value
 
std::string m_description
 
std::string m_order
 
std::string m_readonly
 
std::string m_mandatory
 
std::string m_deprecated
 
std::string m_length
 
std::string m_minimum
 
std::string m_maximum
 
std::string m_filename
 
std::vector< std::string > m_options
 
std::string m_file
 
ItemType m_itemType
 
std::string m_validity
 
std::string m_group
 
std::string m_rule
 
std::string m_bucketProperties
 
std::string m_listSize
 
std::string m_listItemType
 
std::string m_listName
 
std::string m_kvlistKeyName
 
std::string m_kvlistKeyDescription
 
std::vector< std::string > m_permissions
 
std::string m_jsonSchema
 

Member Function Documentation

◆ defaultToJSON()

string ConfigCategory::CategoryItem::defaultToJSON ( ) const

Return only "default" item values.

NOTE: These data types must be all escaped. "default" items in the DefaultConfigCategory class are sent to ConfigurationManager interface which requires string values only:

examples: we must use "100" not 100 and for JSON "{\"pipeline":["scale"]}" not {"pipeline":["scale"]}

◆ toJSON()

string ConfigCategory::CategoryItem::toJSON ( const bool  full = false) const

Create a JSON representation of the configuration item.

Parameters
fullfalse is the default, true evaluates all the members of the CategoryItem

The documentation for this class was generated from the following files: