9#ifndef GEPETTO_VIEWER_MACROS_HH
10#define GEPETTO_VIEWER_MACROS_HH
12#if __cplusplus > 199711L
16using std::dynamic_pointer_cast;
18using std::static_pointer_cast;
24#include <boost/shared_ptr.hpp>
25#include <boost/weak_ptr.hpp>
28using boost::dynamic_pointer_cast;
29using boost::shared_ptr;
30using boost::static_pointer_cast;
40#define ASSERT(condition, message) \
43 std::cerr << "Assertion `" #condition "` failed in " << __FILE__ \
44 << " line " << __LINE__ << ": " << message << std::endl; \
45 std::exit(EXIT_FAILURE); \
51#define DEF_CLASS_SMART_PTR(className) \
53 typedef ::gepetto::viewer::shared_ptr<className> className##Ptr_t; \
54 typedef ::gepetto::viewer::shared_ptr<const className> \
55 className##ConstPtr_t; \
56 typedef ::gepetto::viewer::weak_ptr<className> className##WeakPtr; \
57 typedef ::gepetto::viewer::weak_ptr<const className> className##ConstWeakPtr;
59#define DEF_OSG_CLASS_REF_PTR(className) \
61 typedef ::osg::ref_ptr<className> className##RefPtr; \
62 typedef ::osg::observer_ptr<className> className##ObserverPtr;
64#define SCENE_VIEWER_ACCEPT_VISITOR \
66 virtual void accept(NodeVisitor& nv) { \
67 if (nv.valid(*this)) { \
Definition action-search-bar.hh:27