9 #ifndef GEPETTO_VIEWER_MACROS_HH 10 #define GEPETTO_VIEWER_MACROS_HH 12 #if __cplusplus > 199711L 16 using std::dynamic_pointer_cast;
17 using std::shared_ptr;
18 using std::static_pointer_cast;
24 #include <boost/shared_ptr.hpp> 25 #include <boost/weak_ptr.hpp> 28 using boost::dynamic_pointer_cast;
29 using boost::shared_ptr;
30 using boost::static_pointer_cast;
31 using boost::weak_ptr;
37 #include <osg/ref_ptr> 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)) { \ 72 #endif // GEPETTO_VIEWER_MACROS_HH Definition: action-search-bar.hh:27