init.cpp
Go to the documentation of this file.
00001 /*
00002  * Copyright (c) 2010, Willow Garage, Inc.
00003  * All rights reserved.
00004  *
00005  * Redistribution and use in source and binary forms, with or without
00006  * modification, are permitted provided that the following conditions are met:
00007  *
00008  *     * Redistributions of source code must retain the above copyright
00009  *       notice, this list of conditions and the following disclaimer.
00010  *     * Redistributions in binary form must reproduce the above copyright
00011  *       notice, this list of conditions and the following disclaimer in the
00012  *       documentation and/or other materials provided with the distribution.
00013  *     * Neither the name of the Willow Garage, Inc. nor the names of its
00014  *       contributors may be used to endorse or promote products derived from
00015  *       this software without specific prior written permission.
00016  *
00017  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
00018  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00019  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00020  * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
00021  * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
00022  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
00023  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
00024  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
00025  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
00026  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
00027  * POSSIBILITY OF SUCH DAMAGE.
00028  */
00029 
00030 #include "rve_render_client/init.h"
00031 #include <rve_render_client/registry.h>
00032 #include <rve_common/uuid.h>
00033 
00034 #include <rve_interfaces/BillboardText.h>
00035 #include <rve_interfaces/Camera.h>
00036 #include <rve_interfaces/RenderTarget.h>
00037 #include <rve_interfaces/ScreenRect.h>
00038 #include <rve_interfaces/Scene.h>
00039 #include <rve_interfaces/Material.h>
00040 #include <rve_interfaces/Texture.h>
00041 #include <rve_interfaces/Mesh.h>
00042 #include <rve_interfaces/MeshInstance.h>
00043 #include <rve_interfaces/Sphere.h>
00044 #include <rve_interfaces/Box.h>
00045 #include <rve_interfaces/Cylinder.h>
00046 #include <rve_interfaces/Cone.h>
00047 #include <rve_interfaces/Points.h>
00048 #include <rve_interfaces/Lines.h>
00049 #include <rve_interfaces/Triangles.h>
00050 
00051 #include <ros/ros.h>
00052 
00053 #include <rve_rpc/client.h>
00054 
00055 using namespace rve_common;
00056 
00057 namespace rve_render_client
00058 {
00059 
00060 static uint32_t g_init_count = 0;
00061 
00062 void init()
00063 {
00064   if (++g_init_count == 1)
00065   {
00066     registerProxy<rve_interfaces::BillboardTextProxy>("billboard_text");
00067     registerProxy<rve_interfaces::CameraProxy>("camera");
00068     registerProxy<rve_interfaces::RenderTargetProxy>("render_target");
00069     registerProxy<rve_interfaces::ScreenRectProxy>("screen_rect");
00070     registerProxy<rve_interfaces::SceneProxy>("scene");
00071     registerProxy<rve_interfaces::MaterialProxy>("material");
00072     registerProxy<rve_interfaces::TextureProxy>("texture");
00073     registerProxy<rve_interfaces::MeshProxy>("mesh");
00074     registerProxy<rve_interfaces::MeshInstanceProxy>("mesh_instance");
00075     registerProxy<rve_interfaces::SphereProxy>("sphere");
00076     registerProxy<rve_interfaces::BoxProxy>("box");
00077     registerProxy<rve_interfaces::CylinderProxy>("cylinder");
00078     registerProxy<rve_interfaces::ConeProxy>("cone");
00079     registerProxy<rve_interfaces::PointsProxy>("points");
00080     registerProxy<rve_interfaces::LinesProxy>("lines");
00081     registerProxy<rve_interfaces::TrianglesProxy>("triangles");
00082   }
00083 }
00084 
00085 void shutdown()
00086 {
00087   if (--g_init_count == 0)
00088   {
00089     removeProxy("billboard_text");
00090     removeProxy("camera");
00091     removeProxy("render_target");
00092     removeProxy("screen_rect");
00093     removeProxy("scene");
00094     removeProxy("material");
00095     removeProxy("texture");
00096     removeProxy("mesh");
00097     removeProxy("mesh_instance");
00098     removeProxy("sphere");
00099     removeProxy("box");
00100     removeProxy("cylinder");
00101     removeProxy("cone");
00102     removeProxy("points");
00103     removeProxy("lines");
00104     removeProxy("triangles");
00105   }
00106 }
00107 
00108 } // namespace rve_render_client


rve_render_client
Author(s): Josh Faust
autogenerated on Wed Dec 11 2013 14:31:32