22 #ifndef OPENRAVE_INTERFACE_BASE
23 #define OPENRAVE_INTERFACE_BASE
45 typedef std::map<std::string, XMLReadablePtr, CaseInsensitiveCompare>
READERSMAP;
64 return __strpluginname;
74 return __mapReadableInterfaces;
78 virtual XMLReadablePtr GetReadableInterface(
const std::string& xmltag)
const;
90 __description = description;
96 virtual void SetUserData(
const std::string& key,
UserDataPtr data)
const;
99 virtual UserDataPtr GetUserData(
const std::string& key=std::string())
const;
102 virtual bool RemoveUserData(
const std::string& key)
const;
106 SetUserData(std::string(),data);
110 virtual const std::string&
GetURI()
const {
137 virtual bool SendCommand(std::ostream& os, std::istream& is);
179 virtual void RegisterCommand(
const std::string& cmdname,
InterfaceCommandFn fncmd,
const std::string& strhelp);
182 virtual void UnregisterCommand(
const std::string& cmdname);
184 virtual const char* GetHash()
const = 0;
188 return _mutexInterface;
193 virtual bool _GetCommandHelp(std::ostream& sout, std::istream& sinput)
const;
199 mutable boost::shared_mutex _mutexInterface;
200 InterfaceType __type;
202 std::string __struri;
203 std::string __strpluginname;
204 std::string __strxmlid;
206 mutable std::map<std::string, UserDataPtr> __mapUserData;
208 READERSMAP __mapReadableInterfaces;
209 typedef std::map<std::string, boost::shared_ptr<InterfaceCommand>, CaseInsensitiveCompare> CMDMAP;
210 CMDMAP __mapCommands;
214 friend class Environment;
215 friend class OpenRAVEXMLParser::InterfaceXMLReader;
216 friend class XFileReader;
218 friend class ::Environment;
219 friend class ::OpenRAVEXMLParser::InterfaceXMLReader;
220 friend class ::XFileReader;
223 friend class ColladaReader;
224 friend class RaveDatabase;