openrave.org

 全て クラス ネームスペース ファイル 関数 変数 型定義 列挙型 列挙型の値 フレンド マクロ定義 グループ ページ
構成 | Public 型 | Public メソッド | Protected 型 | Protected メソッド | Protected 変数 | すべてのメンバ一覧
クラス OpenRAVE::InterfaceBaseabstract

[interface] Base class for all interfaces that OpenRAVE provides. See Base Interface Concepts. [詳細]

#include <interface.h>

OpenRAVE::InterfaceBaseに対する継承グラフ
Inheritance graph
[凡例]
OpenRAVE::InterfaceBaseのコラボレーション図
Collaboration graph
[凡例]

構成

class  InterfaceCommand
 

Public 型

typedef std::map< std::string,
XMLReadablePtr,
CaseInsensitiveCompare
READERSMAP
 

Public メソッド

 InterfaceBase (InterfaceType type, EnvironmentBasePtr penv)
 
virtual ~InterfaceBase ()
 
InterfaceType GetInterfaceType () const
 
const std::string & GetXMLId () const
 
const std::string & GetPluginName () const
 
EnvironmentBasePtr GetEnv () const
 
const READERSMAPGetReadableInterfaces () const
 Returns the raw map reference, this is not multithread safe and the GetInterfaceMutex should be locked before using.
 
virtual XMLReadablePtr GetReadableInterface (const std::string &xmltag) const
 Returns the readable interface. [multi-thread safe]
 
virtual XMLReadablePtr SetReadableInterface (const std::string &xmltag, XMLReadablePtr readable)
 Set a new readable interface and return the previously set interface if it exists. [multi-thread safe]
 
virtual const std::string & GetDescription () const
 Documentation of the interface in reStructuredText format. See Documenting Interfaces. [multi-thread safe]
 
virtual void SetDescription (const std::string &description)
 sets a description [multi-thread safe]
 
virtual void SetUserData (const std::string &key, UserDataPtr data) const
 set user data for a specific key. [multi-thread safe]
 
virtual UserDataPtr GetUserData (const std::string &key=std::string()) const
 return the user custom data [multi-thread safe]
 
virtual bool RemoveUserData (const std::string &key) const
 removes a user data pointer. if user data pointer does not exist, then return 0, otherwise 1. [multi-thread safe]
 
virtual void SetUserData (UserDataPtr data) RAVE_DEPRECATED
 
virtual const std::string & GetURI () const
 the URI used to load the interface (sometimes this is not possible if the definition lies inside an environment file). [multi-thread safe]
 
virtual const std::string & GetXMLFilename () const
 
virtual void Clone (InterfaceBaseConstPtr preference, int cloningoptions)
 Clone the contents of an interface to the current interface.
 
virtual bool SendCommand (std::ostream &os, std::istream &is)
 Used to send special commands to the interface and receive output.
 
virtual void Serialize (BaseXMLWriterPtr writer, int options=0) const
 serializes the interface
 

Protected 型

typedef boost::function< bool(std::ostream
&, std::istream &)> 
InterfaceCommandFn
 The function to be executed for every command.
 

Protected メソッド

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
 

Protected 変数

std::string __description
 

説明

[interface] Base class for all interfaces that OpenRAVE provides. See Base Interface Concepts.

interface.h42 行で定義されています。

型定義

typedef boost::function<bool (std::ostream&, std::istream&)> OpenRAVE::InterfaceBase::InterfaceCommandFn
protected

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.h161 行で定義されています。

interface.h45 行で定義されています。

コンストラクタとデストラクタ

OpenRAVE::InterfaceBase::InterfaceBase ( InterfaceType  type,
EnvironmentBasePtr  penv 
)

interface.cpp20 行で定義されています。

OpenRAVE::InterfaceBase::~InterfaceBase ( )
virtual

interface.cpp27 行で定義されています。

関数

void OpenRAVE::InterfaceBase::Clone ( InterfaceBaseConstPtr  preference,
int  cloningoptions 
)
virtual

Clone the contents of an interface to the current interface.

引数
preferencethe interface whose information to clone
cloningoptionsmask of CloningOptions
例外
openrave_exceptionif command doesn't succeed

OpenRAVE::KinBody, OpenRAVE::RobotBase, と OpenRAVE::TrajectoryBaseで再定義されています。

interface.cpp80 行で定義されています。

virtual const std::string& OpenRAVE::InterfaceBase::GetDescription ( ) const
inlinevirtual

Documentation of the interface in reStructuredText format. See Documenting Interfaces. [multi-thread safe]

interface.h84 行で定義されています。

EnvironmentBasePtr OpenRAVE::InterfaceBase::GetEnv ( ) const
inline
戻り値
The environment that this interface is attached to. [multi-thread safe]

interface.h68 行で定義されています。

virtual const char* OpenRAVE::InterfaceBase::GetHash ( ) const
protectedpure virtual
virtual boost::shared_mutex& OpenRAVE::InterfaceBase::GetInterfaceMutex ( ) const
inlineprotectedvirtual
参照
GetDescription()

interface.h187 行で定義されています。

InterfaceType OpenRAVE::InterfaceBase::GetInterfaceType ( ) const
inline

interface.h50 行で定義されています。

const std::string& OpenRAVE::InterfaceBase::GetPluginName ( ) const
inline

set internally by RaveDatabase [multi-thread safe]

戻り値
the pluginname this interface was loaded from

interface.h63 行で定義されています。

XMLReadablePtr OpenRAVE::InterfaceBase::GetReadableInterface ( const std::string &  xmltag) const
virtual

Returns the readable interface. [multi-thread safe]

interface.cpp198 行で定義されています。

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.h73 行で定義されています。

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.h110 行で定義されています。

UserDataPtr OpenRAVE::InterfaceBase::GetUserData ( const std::string &  key = std::string()) const
virtual

return the user custom data [multi-thread safe]

interface.cpp53 行で定義されています。

virtual const std::string& OpenRAVE::InterfaceBase::GetXMLFilename ( ) const
inlinevirtual

interface.h113 行で定義されています。

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.h57 行で定義されています。

void OpenRAVE::InterfaceBase::RegisterCommand ( const std::string &  cmdname,
InterfaceBase::InterfaceCommandFn  fncmd,
const std::string &  strhelp 
)
protectedvirtual

Registers a command and its help string. [multi-thread safe]

引数
cmdname- command name, converted to lower case
fncmdfunction to execute for the command
strhelp- help string in reStructuredText, see Documenting Interfaces.
例外
openrave_exceptionThrow if there exists a registered command already.

interface.cpp121 行で定義されています。

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.cpp63 行で定義されています。

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
引数
isthe input stream containing the command
osthe output stream containing the output
例外
openrave_exceptionThrow if the command is not supported.
戻り値
true if the command is successfully processed, otherwise false.

interface.cpp91 行で定義されています。

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.cpp114 行で定義されています。

virtual void OpenRAVE::InterfaceBase::SetDescription ( const std::string &  description)
inlinevirtual

sets a description [multi-thread safe]

interface.h89 行で定義されています。

XMLReadablePtr OpenRAVE::InterfaceBase::SetReadableInterface ( const std::string &  xmltag,
XMLReadablePtr  readable 
)
virtual

Set a new readable interface and return the previously set interface if it exists. [multi-thread safe]

interface.cpp205 行で定義されています。

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.cpp36 行で定義されています。

virtual void OpenRAVE::InterfaceBase::SetUserData ( UserDataPtr  data)
inlinevirtual
非推奨:
(12/12/11)

interface.h105 行で定義されています。

void OpenRAVE::InterfaceBase::UnregisterCommand ( const std::string &  cmdname)
protectedvirtual

Unregisters the command. [multi-thread safe]

interface.cpp133 行で定義されています。

変数

std::string OpenRAVE::InterfaceBase::__description
protected

interface.h185 行で定義されています。


このクラスの説明は次のファイルから生成されました: