cgv
Loading...
Searching...
No Matches
named.h
1#pragma once
2
3#include "base.h"
4
5#include "lib_begin.h"
6
7namespace cgv {
8 namespace base {
9
10class CGV_API named;
11
14
17
19class CGV_API named : public base
20{
21protected:
23 friend class data::ref_ptr<named,true>;
25 std::string name;
26public:
28 named(const std::string& name = "");
30 const std::string& get_name() const;
32 void set_name(const std::string& _name);
34 named_ptr get_named();
36 const_named_ptr get_named_const();
38 std::string get_type_name() const;
39};
40
41template <> struct cast_helper<named>
42{
43 inline static named_ptr cast(base* b) { return b->get_named(); }
44};
45
46template <> struct cast_const_helper<named>
47{
48 inline static const_named_ptr cast_const(const base* b) { return b->get_named_const(); }
49};
50
51#if _MSC_VER >= 1400
52CGV_TEMPLATE template class CGV_API data::ref_ptr<named>;
53#endif
54
55 }
56}
57
58#include <cgv/config/lib_end.h>
base class for all classes that can be registered with support for dynamic properties (see also secti...
Definition base.h:75
base class for all gui types
Definition named.h:20
std::string name
store the name as a string
Definition named.h:25
complete implementation of method actions that only call one method when entering a node
Definition action.h:113
reference counted pointer, which can work together with types that are derived from ref_counted,...
Definition ref_ptr.h:160
data::ref_ptr< named, true > named_ptr
ref counted pointer to a node
Definition named.h:13
data::ref_ptr< const named, true > const_named_ptr
ref counted pointer to a const node
Definition named.h:16
the cgv namespace
Definition print.h:11