cgv
Loading...
Searching...
No Matches
attach_slot.h
1#pragma once
2
3#include "base.h"
4
5#include "lib_begin.h"
6
7namespace cgv {
8 namespace base {
9
11class CGV_API attach_slot
12{
13protected:
18public:
22 void attach(base_ptr attachment_object, void* user_data = 0);
24 void attach(base_ptr attachment_object, int user_data);
28 void* get_attachement_data() const;
31};
32
34
36extern CGV_API bool attach(base_ptr slot_object, base_ptr attachment_object, void* user_data = 0);
37extern CGV_API bool attach(base_ptr slot_object, base_ptr attachment_object, int user_data);
38
40
42extern CGV_API base_ptr get_attachment(base_ptr slot_object);
43
45
47extern CGV_API void* get_attachment_data(base_ptr slot_object);
48extern CGV_API int get_attachment_data_int(base_ptr slot_object);
49
50 }
51}
52
53#include <cgv/config/lib_end.h>
void * attachment_user_data
allow to add user data to the attachment
Definition attach_slot.h:17
base_ptr get_attachment() const
return current attachment
void attach(base_ptr attachment_object, void *user_data=0)
attach object to attachment slot
base_ptr attachment
allow to attach some object to group
Definition attach_slot.h:15
void * get_attachement_data() const
return current attachment
int get_attachement_data_int() const
return current attachment
attach_slot()
init the user data
the base namespace holds the base hierarchy, support for plugin registration and signals
Definition action.cxx:4
base_ptr get_attachment(base_ptr slot_object)
query the attachment of an attach_slot object.
data::ref_ptr< base, true > base_ptr
ref counted pointer to base
Definition base.h:37
bool attach(base_ptr slot_object, base_ptr attachment_object, void *user_data)
function to attach an object to an object of type attach_slot.
void * get_attachment_data(base_ptr slot_object)
query the user data of the attachment of an attach_slot object.
this header is dependency free
Definition print.h:11