openrave.org

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Public Member Functions | Static Public Member Functions | Protected Member Functions | Static Protected Member Functions | Friends | List of all members
OpenRAVE::RaveGlobal Class Reference
Inheritance diagram for OpenRAVE::RaveGlobal:
Inheritance graph
[legend]
Collaboration diagram for OpenRAVE::RaveGlobal:
Collaboration graph
[legend]

Classes

class  XMLReaderFunctionData
 

Public Member Functions

virtual ~RaveGlobal ()
 
int Initialize (bool bLoadAllPlugins, int level)
 
void Destroy ()
 
void AddCallbackForDestroy (const boost::function< void()> &fn)
 
std::string GetHomeDirectory ()
 
std::string FindDatabaseFile (const std::string &filename, bool bRead)
 
void SetDebugLevel (int level)
 
int GetDebugLevel ()
 
UserDataPtr RegisterXMLReader (InterfaceType type, const std::string &xmltag, const CreateXMLReaderFn &fn)
 
const BaseXMLReaderPtr CallXMLReader (InterfaceType type, const std::string &xmltag, InterfaceBasePtr pinterface, const AttributesList &atts)
 
boost::shared_ptr< RaveDatabase > GetDatabase () const
 
const std::map< InterfaceType,
std::string > & 
GetInterfaceNamesMap () const
 
const std::map
< IkParameterizationType,
std::string > & 
GetIkParameterizationMap (int alllowercase=0)
 
const std::string & GetInterfaceName (InterfaceType type)
 
int RegisterEnvironment (EnvironmentBase *penv)
 
void UnregisterEnvironment (EnvironmentBase *penv)
 
int GetEnvironmentId (EnvironmentBasePtr penv)
 
EnvironmentBasePtr GetEnvironment (int id)
 
void GetEnvironments (std::list< EnvironmentBasePtr > &listenvironments)
 
SpaceSamplerBasePtr GetDefaultSampler ()
 
std::string FindLocalFile (const std::string &_filename, const std::string &curdir)
 
bool InvertFileLookup (std::string &newfilename, const std::string &filename)
 
void SetDataAccess (int options)
 
int GetDataAccess ()
 
- Public Member Functions inherited from OpenRAVE::UserData
virtual ~UserData ()
 

Static Public Member Functions

static boost::shared_ptr
< RaveGlobal > & 
instance ()
 

Protected Member Functions

bool _IsInitialized () const
 
void _UpdateDataDirs ()
 

Static Protected Member Functions

static void _create ()
 

Friends

void RaveInitializeFromState (UserDataPtr)
 Initializes the global state from an already loaded OpenRAVE environment.
 
UserDataPtr RaveGlobalState ()
 A pointer to the global openrave state.
 

Detailed Description

there is only once global openrave state. It is created when openrave is first used, and destroyed when the program quits or RaveDestroy is called.

Definition at line 304 of file libopenrave.cpp.

Constructor & Destructor Documentation

virtual OpenRAVE::RaveGlobal::~RaveGlobal ( )
inlinevirtual

Definition at line 356 of file libopenrave.cpp.

Member Function Documentation

static void OpenRAVE::RaveGlobal::_create ( )
inlinestaticprotected

Definition at line 716 of file libopenrave.cpp.

bool OpenRAVE::RaveGlobal::_IsInitialized ( ) const
inlineprotected

Definition at line 723 of file libopenrave.cpp.

void OpenRAVE::RaveGlobal::_UpdateDataDirs ( )
inlineprotected

Definition at line 727 of file libopenrave.cpp.

void OpenRAVE::RaveGlobal::AddCallbackForDestroy ( const boost::function< void()> &  fn)
inline

Definition at line 466 of file libopenrave.cpp.

const BaseXMLReaderPtr OpenRAVE::RaveGlobal::CallXMLReader ( InterfaceType  type,
const std::string &  xmltag,
InterfaceBasePtr  pinterface,
const AttributesList atts 
)
inline

Definition at line 538 of file libopenrave.cpp.

void OpenRAVE::RaveGlobal::Destroy ( )
inline

Definition at line 422 of file libopenrave.cpp.

std::string OpenRAVE::RaveGlobal::FindDatabaseFile ( const std::string &  filename,
bool  bRead 
)
inline

Definition at line 477 of file libopenrave.cpp.

std::string OpenRAVE::RaveGlobal::FindLocalFile ( const std::string &  _filename,
const std::string &  curdir 
)
inline

Definition at line 633 of file libopenrave.cpp.

int OpenRAVE::RaveGlobal::GetDataAccess ( )
inline

Definition at line 710 of file libopenrave.cpp.

boost::shared_ptr<RaveDatabase> OpenRAVE::RaveGlobal::GetDatabase ( ) const
inline

Definition at line 548 of file libopenrave.cpp.

int OpenRAVE::RaveGlobal::GetDebugLevel ( )
inline

Definition at line 504 of file libopenrave.cpp.

SpaceSamplerBasePtr OpenRAVE::RaveGlobal::GetDefaultSampler ( )
inline

Definition at line 623 of file libopenrave.cpp.

EnvironmentBasePtr OpenRAVE::RaveGlobal::GetEnvironment ( int  id)
inline

Definition at line 601 of file libopenrave.cpp.

int OpenRAVE::RaveGlobal::GetEnvironmentId ( EnvironmentBasePtr  penv)
inline

Definition at line 590 of file libopenrave.cpp.

void OpenRAVE::RaveGlobal::GetEnvironments ( std::list< EnvironmentBasePtr > &  listenvironments)
inline

Definition at line 611 of file libopenrave.cpp.

std::string OpenRAVE::RaveGlobal::GetHomeDirectory ( )
inline

Definition at line 472 of file libopenrave.cpp.

const std::map<IkParameterizationType,std::string>& OpenRAVE::RaveGlobal::GetIkParameterizationMap ( int  alllowercase = 0)
inline

Definition at line 554 of file libopenrave.cpp.

const std::string& OpenRAVE::RaveGlobal::GetInterfaceName ( InterfaceType  type)
inline

Definition at line 561 of file libopenrave.cpp.

const std::map<InterfaceType,std::string>& OpenRAVE::RaveGlobal::GetInterfaceNamesMap ( ) const
inline

Definition at line 551 of file libopenrave.cpp.

int OpenRAVE::RaveGlobal::Initialize ( bool  bLoadAllPlugins,
int  level 
)
inline

Definition at line 366 of file libopenrave.cpp.

static boost::shared_ptr<RaveGlobal>& OpenRAVE::RaveGlobal::instance ( )
inlinestatic

Definition at line 360 of file libopenrave.cpp.

bool OpenRAVE::RaveGlobal::InvertFileLookup ( std::string &  newfilename,
const std::string &  filename 
)
inline

Definition at line 677 of file libopenrave.cpp.

int OpenRAVE::RaveGlobal::RegisterEnvironment ( EnvironmentBase penv)
inline

Definition at line 571 of file libopenrave.cpp.

UserDataPtr OpenRAVE::RaveGlobal::RegisterXMLReader ( InterfaceType  type,
const std::string &  xmltag,
const CreateXMLReaderFn fn 
)
inline

Definition at line 533 of file libopenrave.cpp.

void OpenRAVE::RaveGlobal::SetDataAccess ( int  options)
inline

Definition at line 706 of file libopenrave.cpp.

void OpenRAVE::RaveGlobal::SetDebugLevel ( int  level)
inline

Definition at line 499 of file libopenrave.cpp.

void OpenRAVE::RaveGlobal::UnregisterEnvironment ( EnvironmentBase penv)
inline

Definition at line 579 of file libopenrave.cpp.

Friends And Related Function Documentation

UserDataPtr RaveGlobalState ( )
friend

A pointer to the global openrave state.

Returns
a managed pointer to the state.
void RaveInitializeFromState ( UserDataPtr  globalstate)
friend

Initializes the global state from an already loaded OpenRAVE environment.

Because of shared object boundaries, it is necessary to pass the global state pointer around. If using plugin.h, this function is automatically called by CreateInterfaceValidated. It is also called by and every InterfaceBase constructor.

Parameters
[in]globalstate

The documentation for this class was generated from the following file: