#include <ot_lib.h>
Public Member Functions | |
void | add (ot_interfaceElement *element) |
void | remove (const string &elementName) |
ot_interfaceElement * | get (const string &name) |
void | callFuction (const string &functionName, const ot_obj &input, auto_ptr< ot_obj > &output) |
void | addInterface (const string &interfaceName, OT_IE_ACCESS access) |
void | removeInterface (const string &interfaceName) |
ot_interface * | findInterface (const string &iPath) |
const ot_map | dumpInterface (void) |
void | setAccessMode (OT_IE_ACCESS access) |
OT_IE_ACCESS | getAccessMode (void) const |
const string | getInterfaceName (void) const |
const string | getInterfacePath (void) const |
void | clear (void) |
Clear interface, delete all attribures and sub-interfaces. | |
Private Member Functions | |
ot_interface (const string &interfacePath, const string &interfaceName, OT_IE_ACCESS access=IE_PRIVATE) | |
~ot_interface (void) | |
Destructor. | |
Private Attributes | |
string | m_interfacePath |
The interface path. | |
string | m_interfaceName |
The interface name. | |
interfaceRepository | m_intRep |
Interface repository. | |
map< string, ot_interface * > | m_interfaceList |
Map of child interfaces. | |
OT_IE_ACCESS | m_access |
Access mode. | |
Friends | |
class | ot_functionManager |
Interface class
ot_lib::ot_interface::ot_interface | ( | const string & | interfacePath, | |
const string & | interfaceName, | |||
OT_IE_ACCESS | access = IE_PRIVATE | |||
) | [private] |
Contructor
interfacePath | The interface path | |
interfaceName | The interface name | |
access | Interface access mode |
ot_lib::ot_interface::~ot_interface | ( | void | ) | [private] |
Destructor.
void ot_lib::ot_interface::add | ( | ot_interfaceElement * | element | ) |
Add a new element to the interface
ie | The new element |
void ot_lib::ot_interface::remove | ( | const string & | elementName | ) |
Remove an element from the interface
elementName | The element name |
ot_interfaceElement* ot_lib::ot_interface::get | ( | const string & | name | ) |
Get an elemento from interface
name | The element name |
void ot_lib::ot_interface::callFuction | ( | const string & | functionName, | |
const ot_obj & | input, | |||
auto_ptr< ot_obj > & | output | |||
) |
Call a function registered in this interface
functionName | The function name | |
input | Input data | |
output | Function output |
void ot_lib::ot_interface::addInterface | ( | const string & | interfaceName, | |
OT_IE_ACCESS | access | |||
) |
Add a new child interface
interfaceName | The interface name | |
access | Interface access mode |
void ot_lib::ot_interface::removeInterface | ( | const string & | interfaceName | ) |
Remove a registered interface
interfaceName | The interface name |
ot_interface* ot_lib::ot_interface::findInterface | ( | const string & | iPath | ) |
Search a registered interface (from here including the child interfaces)
iPath | The interface Path |
const ot_map ot_lib::ot_interface::dumpInterface | ( | void | ) |
Dump interface/function into a ot_seq (from this iterface)
void ot_lib::ot_interface::setAccessMode | ( | OT_IE_ACCESS | access | ) |
Set the interface access mode
access | The new access mode |
OT_IE_ACCESS ot_lib::ot_interface::getAccessMode | ( | void | ) | const |
Get the interface access mode
const string ot_lib::ot_interface::getInterfaceName | ( | void | ) | const [inline] |
Get the interface name
const string ot_lib::ot_interface::getInterfacePath | ( | void | ) | const [inline] |
Get the interface path
void ot_lib::ot_interface::clear | ( | void | ) |
Clear interface, delete all attribures and sub-interfaces.
friend class ot_functionManager [friend] |
string ot_lib::ot_interface::m_interfacePath [private] |
The interface path.
string ot_lib::ot_interface::m_interfaceName [private] |
The interface name.
Interface repository.
map<string,ot_interface *> ot_lib::ot_interface::m_interfaceList [private] |
Map of child interfaces.
OT_IE_ACCESS ot_lib::ot_interface::m_access [private] |
Access mode.