Qore DataProvider Module Reference  1.0
DataProvider::DataProviderTypeEntry Class Reference

the DataProviderTypeEntry class More...

Public Member Functions

 addChild (string child)
 Adds a child node to the entry. More...
 
 constructor ()
 Creates the entry as a root node.
 
 constructor (string path, string name)
 Creates the entry as a root node.
 
*DataProviderTypeEntry getChild (string child)
 Returns the given child, if any. More...
 
*DataProviderTypeEntry getChildEx (string child)
 Returns the given child, if any, otherwise throws an exception. More...
 
*list< stringgetChildNames ()
 Returns a list of child entry names, if any. More...
 
DataProviderTypeEntry getCreateChild (string child)
 Returns the given child and creates it if necessary. More...
 
hash< DataProviderTypeEntryInfogetInfo ()
 Returns information about this entry. More...
 
string getName ()
 Returns the name of the entry.
 
string getPath ()
 Returns the path of the entry.
 
*AbstractDataProviderType getType ()
 Returns the type at the entry level, if any. More...
 
*AbstractDataProviderType getTypeEx ()
 Returns the type at the entry level, if any, otherwise throws an exception. More...
 
*list< stringlistTypes ()
 Returns a list of registered data provider type paths. More...
 
 setType (AbstractDataProviderType type)
 Sets the type for the entry. More...
 

Protected Attributes

*hash< string, DataProviderTypeEntrychildren
 Children of this entry.
 
string name
 The name of this entry.
 
string path
 The path to this entry.
 
*AbstractDataProviderType type
 The type at this location.
 

Detailed Description

Member Function Documentation

◆ addChild()

DataProvider::DataProviderTypeEntry::addChild ( string  child)

Adds a child node to the entry.

Parameters
childthe name of the child node to add
Exceptions
CHILD-ERRORa child with the same name already exists

◆ getChild()

*DataProviderTypeEntry DataProvider::DataProviderTypeEntry::getChild ( string  child)

Returns the given child, if any.

Returns
the given child, if any

◆ getChildEx()

*DataProviderTypeEntry DataProvider::DataProviderTypeEntry::getChildEx ( string  child)

Returns the given child, if any, otherwise throws an exception.

Returns
the given child, if any, otherwise throws an exception
Exceptions
INVALID-CHILDthe given child is unknown

◆ getChildNames()

*list<string> DataProvider::DataProviderTypeEntry::getChildNames ( )

Returns a list of child entry names, if any.

Returns
a list of child entry names, if any

◆ getCreateChild()

DataProviderTypeEntry DataProvider::DataProviderTypeEntry::getCreateChild ( string  child)

Returns the given child and creates it if necessary.

Returns
the given child and creates it if necessary

◆ getInfo()

hash<DataProviderTypeEntryInfo> DataProvider::DataProviderTypeEntry::getInfo ( )

Returns information about this entry.

Returns
information about this entry

◆ getType()

*AbstractDataProviderType DataProvider::DataProviderTypeEntry::getType ( )

Returns the type at the entry level, if any.

Returns
the type at the entry level, if any

◆ getTypeEx()

*AbstractDataProviderType DataProvider::DataProviderTypeEntry::getTypeEx ( )

Returns the type at the entry level, if any, otherwise throws an exception.

Returns
the type at the entry level, if any, otherwise throws an exception
Exceptions
NO-TYPEthis entry has no type, only children

◆ listTypes()

*list<string> DataProvider::DataProviderTypeEntry::listTypes ( )

Returns a list of registered data provider type paths.

Note
types are stored based on the path provided which may differ from their type names (which may be generic and therefore not suitable for indexing)

◆ setType()

DataProvider::DataProviderTypeEntry::setType ( AbstractDataProviderType  type)

Sets the type for the entry.

Parameters
typethe type to set for this entry
Exceptions
TYPE-ERRORa type has already been set for this entry