Loading...
Searching...
No Matches
DataProviderTypeEntry.qc.dox.h
// -*- mode: c++; indent-tabs-mode: nil -*-
// assume local scope for variables, do not use "$" signs
// require type definitions everywhere
// strict argument handling
// enable all warnings
namespace DataProvider {
public struct DataProviderTypeEntryInfo {
string name;
string desc;
string path;
bool has_type;
bool locked = False;
*list<string> children;
};
class DataProviderTypeEntry : public Qore::Serializable {
public:
protected:
string path;
string name;
*hash<string, DataProviderTypeEntry> children;
*hash<string, DataProviderTypeEntry> type_children;
*hash<string, DataProviderTypeEntry> rec_children;
*AbstractDataProviderType type;
bool locked = False;
bool parent = False;
public:
constructor();
constructor(string path, string name);
string getName();
string getDesc();
string getPath();
bool hasType();
bool isParent();
bool lock();
addChild(string child);
bool setType(AbstractDataProviderType type, bool locked = False);
*AbstractDataProviderType setOrReplaceType(AbstractDataProviderType type);
hash<DataProviderTypeEntryInfo> getInfo(*bool rec_children_only);
*list<string> listTypes();
*list<string> listParentTypes();
*list<string> getChildNames();
*AbstractDataProviderType getType();
*AbstractDataProviderType getTypeEx();
*DataProviderTypeEntry getChild(string child);
*DataProviderTypeEntry getChildEx(string child);
removeChild(string child);
lockAll();
bool clear();
DataProviderTypeEntry getCreateChild(string child);
private:
setTypeChildren();
public:
private:
constructor(string path, string name, AbstractDataProviderType type);
public:
};
};
DataProvider::AbstractDataProviderType
describes a data type
Definition: AbstractDataProviderType.qc.dox.h:206
DataProvider::DataProviderTypeEntry
the DataProviderTypeEntry class
Definition: DataProviderTypeEntry.qc.dox.h:58
DataProvider::DataProviderTypeEntry::setType
bool setType(AbstractDataProviderType type, bool locked=False)
Sets the type for the entry.
DataProvider::DataProviderTypeEntry::isParent
bool isParent()
Returns True if the entry is a "parent" entry, meaning that all children were added with this entry.
DataProvider::DataProviderTypeEntry::clear
bool clear()
Clears the type hierarchy of all non-locked types.
DataProvider::DataProviderTypeEntry::constructor
constructor()
Creates the entry as a root node.
DataProvider::DataProviderTypeEntry::getPath
string getPath()
Returns the path of the entry.
DataProvider::DataProviderTypeEntry::getType
*AbstractDataProviderType getType()
Returns the type at the entry level, if any.
DataProvider::DataProviderTypeEntry::setTypeChildren
setTypeChildren()
Sets up attributes as children.
DataProvider::DataProviderTypeEntry::listParentTypes
*list< string > listParentTypes()
Returns a list of registered data provider type paths where each type listed is a "parent" type.
DataProvider::DataProviderTypeEntry::constructor
constructor(string path, string name)
Creates the entry as a child node.
DataProvider::DataProviderTypeEntry::getTypeEx
*AbstractDataProviderType getTypeEx()
Returns the type at the entry level, if any, otherwise throws an exception.
DataProvider::DataProviderTypeEntry::rec_children
*hash< string, DataProviderTypeEntry > rec_children
Names of attributes that can be referenced as children that have their own fields.
Definition: DataProviderTypeEntry.qc.dox.h:75
DataProvider::DataProviderTypeEntry::constructor
constructor(string path, string name, AbstractDataProviderType type)
Creates the entry as a child node.
DataProvider::DataProviderTypeEntry::type_children
*hash< string, DataProviderTypeEntry > type_children
Names of attributes that can be referenced as children.
Definition: DataProviderTypeEntry.qc.dox.h:72
DataProvider::DataProviderTypeEntry::getDesc
string getDesc()
Returns the description of the entry.
DataProvider::DataProviderTypeEntry::hasType
bool hasType()
Returns True if the entry has a type.
DataProvider::DataProviderTypeEntry::path
string path
The path to this entry.
Definition: DataProviderTypeEntry.qc.dox.h:63
DataProvider::DataProviderTypeEntry::lockAll
lockAll()
Locks all types.
DataProvider::DataProviderTypeEntry::locked
bool locked
True if the entry is locked and therefore cannot be deleted or updated
Definition: DataProviderTypeEntry.qc.dox.h:83
DataProvider::DataProviderTypeEntry::getInfo
hash< DataProviderTypeEntryInfo > getInfo(*bool rec_children_only)
Returns information about this entry.
DataProvider::DataProviderTypeEntry::getChildEx
*DataProviderTypeEntry getChildEx(string child)
Returns the given child, if any, otherwise throws an exception.
DataProvider::DataProviderTypeEntry::getName
string getName()
Returns the name of the entry.
DataProvider::DataProviderTypeEntry::addChild
addChild(string child)
Adds a child node to the entry.
DataProvider::DataProviderTypeEntry::removeChild
removeChild(string child)
Removes the given child, if it exists.
DataProvider::DataProviderTypeEntry::listTypes
*list< string > listTypes()
Returns a list of registered data provider type paths.
DataProvider::DataProviderTypeEntry::lock
bool lock()
Locks the entry, so it can't be removed or changed.
DataProvider::DataProviderTypeEntry::type
*AbstractDataProviderType type
The type at this location.
Definition: DataProviderTypeEntry.qc.dox.h:78
DataProvider::DataProviderTypeEntry::parent
bool parent
True if this entry is a "parent" type; if the children were added atomically with this entry
Definition: DataProviderTypeEntry.qc.dox.h:86
DataProvider::DataProviderTypeEntry::name
string name
The name of this entry.
Definition: DataProviderTypeEntry.qc.dox.h:66
DataProvider::DataProviderTypeEntry::getCreateChild
DataProviderTypeEntry getCreateChild(string child)
Returns the given child and creates it if necessary.
DataProvider::DataProviderTypeEntry::setOrReplaceType
*AbstractDataProviderType setOrReplaceType(AbstractDataProviderType type)
Sets or replaces the type for the entry.
DataProvider::DataProviderTypeEntry::getChild
*DataProviderTypeEntry getChild(string child)
Returns the given child, if any.
DataProvider::DataProviderTypeEntry::children
*hash< string, DataProviderTypeEntry > children
Children of this entry.
Definition: DataProviderTypeEntry.qc.dox.h:69
DataProvider::DataProviderTypeEntry::getChildNames
*list< string > getChildNames()
Returns a list of child entry names, if any.
Qore::Serializable
DataProvider
Qore AbstractDataField class definition.
Definition: AbstractDataField.qc.dox.h:27
DataProvider::DataProviderTypeEntryInfo
Data provider type entry info.
Definition: DataProviderTypeEntry.qc.dox.h:33
DataProvider::DataProviderTypeEntryInfo::children
*list< string > children
The names of any children.
Definition: DataProviderTypeEntry.qc.dox.h:54
DataProvider::DataProviderTypeEntryInfo::name
string name
The name of the entry.
Definition: DataProviderTypeEntry.qc.dox.h:35
DataProvider::DataProviderTypeEntryInfo::locked
bool locked
True if the entry is locked and therefore cannot be deleted or updated
Definition: DataProviderTypeEntry.qc.dox.h:51
DataProvider::DataProviderTypeEntryInfo::has_type
bool has_type
True if the entry has a type
Definition: DataProviderTypeEntry.qc.dox.h:46
DataProvider::DataProviderTypeEntryInfo::desc
string desc
The description of the entry.
Definition: DataProviderTypeEntry.qc.dox.h:38
DataProvider::DataProviderTypeEntryInfo::path
string path
The path to the entry including the name as the last element.
Definition: DataProviderTypeEntry.qc.dox.h:41