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
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>
interface for an attachment slot that can store a base pointer
Definition attach_slot.h:12
void * attachment_user_data
allow to add user data to the attachment
Definition attach_slot.h:17
base_ptr attachment
allow to attach some object to group
Definition attach_slot.h:15
int get_attachement_data_int() const
return current attachment
complete implementation of method actions that only call one method when entering a node
Definition action.h:113
base_ptr get_attachment(base_ptr slot_object)
query the attachment of an attach_slot object.
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.
the cgv namespace
Definition print.h:11