[interface] Base class for all interfaces that OpenRAVE provides. See Base Interface Concepts.
[詳細]
#include <interface.h>
|
typedef boost::function< bool(std::ostream
&, std::istream &)> | InterfaceCommandFn |
| The function to be executed for every command.
|
|
|
virtual void | RegisterCommand (const std::string &cmdname, InterfaceCommandFn fncmd, const std::string &strhelp) |
| Registers a command and its help string. [multi-thread safe]
|
|
virtual void | UnregisterCommand (const std::string &cmdname) |
| Unregisters the command. [multi-thread safe]
|
|
virtual const char * | GetHash () const =0 |
|
virtual boost::shared_mutex & | GetInterfaceMutex () const |
|
[interface] Base class for all interfaces that OpenRAVE provides. See Base Interface Concepts.
interface.h の 42 行で定義されています。
The function to be executed for every command.
- 引数
-
sinput | - input of the command |
sout | - output of the command |
- 戻り値
- If false, there was an error with the command, true if successful
interface.h の 161 行で定義されています。
OpenRAVE::InterfaceBase::~InterfaceBase |
( |
| ) |
|
|
virtual |
virtual const std::string& OpenRAVE::InterfaceBase::GetDescription |
( |
| ) |
const |
|
inlinevirtual |
- 戻り値
- The environment that this interface is attached to. [multi-thread safe]
interface.h の 68 行で定義されています。
virtual const char* OpenRAVE::InterfaceBase::GetHash |
( |
| ) |
const |
|
protectedpure virtual |
virtual boost::shared_mutex& OpenRAVE::InterfaceBase::GetInterfaceMutex |
( |
| ) |
const |
|
inlineprotectedvirtual |
InterfaceType OpenRAVE::InterfaceBase::GetInterfaceType |
( |
| ) |
const |
|
inline |
const std::string& OpenRAVE::InterfaceBase::GetPluginName |
( |
| ) |
const |
|
inline |
set internally by RaveDatabase [multi-thread safe]
- 戻り値
- the pluginname this interface was loaded from
interface.h の 63 行で定義されています。
XMLReadablePtr OpenRAVE::InterfaceBase::GetReadableInterface |
( |
const std::string & |
xmltag | ) |
const |
|
virtual |
Returns the readable interface. [multi-thread safe]
interface.cpp の 198 行で定義されています。
const READERSMAP& OpenRAVE::InterfaceBase::GetReadableInterfaces |
( |
| ) |
const |
|
inline |
Returns the raw map reference, this is not multithread safe and the GetInterfaceMutex should be locked before using.
interface.h の 73 行で定義されています。
virtual const std::string& OpenRAVE::InterfaceBase::GetURI |
( |
| ) |
const |
|
inlinevirtual |
the URI used to load the interface (sometimes this is not possible if the definition lies inside an environment file). [multi-thread safe]
interface.h の 110 行で定義されています。
UserDataPtr OpenRAVE::InterfaceBase::GetUserData |
( |
const std::string & |
key = std::string() | ) |
const |
|
virtual |
return the user custom data [multi-thread safe]
interface.cpp の 53 行で定義されています。
virtual const std::string& OpenRAVE::InterfaceBase::GetXMLFilename |
( |
| ) |
const |
|
inlinevirtual |
const std::string& OpenRAVE::InterfaceBase::GetXMLId |
( |
| ) |
const |
|
inline |
set internally by RaveDatabase [multi-thread safe]
- 戻り値
- the unique identifier that describes this class type, case is ignored should be the same id used to create the object
interface.h の 57 行で定義されています。
Registers a command and its help string. [multi-thread safe]
- 引数
-
cmdname | - command name, converted to lower case |
fncmd | function to execute for the command |
strhelp | - help string in reStructuredText, see Documenting Interfaces. |
- 例外
-
interface.cpp の 121 行で定義されています。
bool OpenRAVE::InterfaceBase::RemoveUserData |
( |
const std::string & |
key | ) |
const |
|
virtual |
removes a user data pointer. if user data pointer does not exist, then return 0, otherwise 1. [multi-thread safe]
interface.cpp の 63 行で定義されています。
bool OpenRAVE::InterfaceBase::SendCommand |
( |
std::ostream & |
os, |
|
|
std::istream & |
is |
|
) |
| |
|
virtual |
Used to send special commands to the interface and receive output.
The command must be registered by RegisterCommand. A special command 'help' is always supported and provides a way for the user to query the current commands and the help string. The format of the returned help commands are in reStructuredText. The following commands are possible:
- 'help [command name]' - get the help string of just that command.
- 'help commands' - return the names of all the possible commands
- 引数
-
is | the input stream containing the command |
os | the output stream containing the output |
- 例外
-
- 戻り値
- true if the command is successfully processed, otherwise false.
interface.cpp の 91 行で定義されています。
void OpenRAVE::InterfaceBase::Serialize |
( |
BaseXMLWriterPtr |
writer, |
|
|
int |
options = 0 |
|
) |
| const |
|
virtual |
serializes the interface
The readable interfaces are also serialized within the tag, for example:
<sometag> <!-- root writer -->
<interface> <!-- first child -->
<readableinterface/> <!-- readable interface -->
</interface>
</sometag>
Depending on the writer format, extra tags might be created.
OpenRAVE::KinBodyで再定義されています。
interface.cpp の 114 行で定義されています。
virtual void OpenRAVE::InterfaceBase::SetDescription |
( |
const std::string & |
description | ) |
|
|
inlinevirtual |
sets a description [multi-thread safe]
interface.h の 89 行で定義されています。
Set a new readable interface and return the previously set interface if it exists. [multi-thread safe]
interface.cpp の 205 行で定義されています。
void OpenRAVE::InterfaceBase::SetUserData |
( |
const std::string & |
key, |
|
|
UserDataPtr |
data |
|
) |
| const |
|
virtual |
set user data for a specific key. [multi-thread safe]
Because user data can be used for caching objects, it is necessary to allow functions taking const pointers of the interface can reset the pointers.
interface.cpp の 36 行で定義されています。
virtual void OpenRAVE::InterfaceBase::SetUserData |
( |
UserDataPtr |
data | ) |
|
|
inlinevirtual |
void OpenRAVE::InterfaceBase::UnregisterCommand |
( |
const std::string & |
cmdname | ) |
|
|
protectedvirtual |
std::string OpenRAVE::InterfaceBase::__description |
|
protected |
このクラスの説明は次のファイルから生成されました: