Skip to content
Snippets Groups Projects
Commit 55af1c90 authored by hdallard's avatar hdallard
Browse files

Add GraphicalInterface::nodeExists

parent 3b6bb0a9
No related branches found
No related tags found
No related merge requests found
......@@ -89,6 +89,10 @@ typedef sequence<Position> PositionSeq;
/// \param input windowId : ID of the window
boolean detachCamera(in unsigned long windowId) raises (Error);
/// Check if nodeName is an existing node.
/// \param nodeName name of the node
boolean nodeExists(in string nodeName) raises (Error);
/// create a floor called floorName.
/// \param input floorName : name of the floor.
boolean addFloor(in string floorName) raises (Error);
......
......@@ -113,7 +113,6 @@ namespace graphics {
WindowsManager ();
WindowID addWindow (std::string winName, WindowManagerPtr_t newWindow);
bool nodeExists (const std::string& name);
template <typename NodeContainer_t>
std::size_t getNodes
(const gepetto::corbaserver::Names_t& name, NodeContainer_t& nodes);
......@@ -149,6 +148,8 @@ namespace graphics {
virtual bool attachCameraToNode(const char* nodeNameCorba, const WindowID windowId);
virtual bool detachCamera(const WindowID windowId);
virtual bool nodeExists (const std::string& name);
virtual bool addFloor(const char* floorNameCorba);
virtual bool addBox(const char* boxName, float boxSize1, float boxSize2, float boxSize3, const value_type* color);
......
......@@ -113,6 +113,15 @@ namespace graphics {
}
}
bool GraphicalInterface::nodeExists(const char* nodeName)
{
try {
return windowsManager_->nodeExists(nodeName);
} catch (const std::exception& exc) {
throw Error(exc.what());
}
}
bool GraphicalInterface::addFloor (const char* floorNameCorba)
throw (Error)
{
......
......@@ -62,6 +62,8 @@ public:
virtual bool attachCameraToNode(const char* nodeName, const WindowID windowId);
virtual bool detachCamera(const WindowID windowId);
virtual bool nodeExists(const char* nodeName);
virtual bool addFloor(const char* floorName) throw (Error);
virtual bool addBox(const char* boxName, float boxSize1, float boxSize2, float boxSize3, const value_type* color) throw (Error);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment