Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F95240880
describable.h
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Sat, Dec 14, 00:48
Size
946 B
Mime Type
text/x-c++
Expires
Mon, Dec 16, 00:48 (2 d)
Engine
blob
Format
Raw Data
Handle
22951673
Attached To
rSYMKIT symkit
describable.h
View Options
#ifndef DESCRIPTABLE_H
#define DESCRIPTABLE_H
class
Descriptor
;
class
Describable
{
public:
// give a descriptor specification inheriting this class
Describable
(
Descriptor
*
desc
=
0
);
virtual
~
Describable
();
void
bind
(
Descriptor
*
);
void
release
();
bool
isBound
()
const
;
Descriptor
*
getDescriptor
();
/*
* Evolution method
* Check for bound state before calling
* this function !
*/
void
updateDescriptor
(
float
dt
);
/* virtual state check method */
virtual
bool
isRunningDescriptor
()
const
=
0
;
protected:
/*
* Warning!
* This method is not type safe, use with consciousness
*/
template
<
class
T
>
T
*
cast_descriptor
()
{
return
static_cast
<
T
*>
(
descriptor
);
}
template
<
class
T
>
const
T
*
cast_descriptor
()
const
{
return
static_cast
<
T
*>
(
descriptor
);
}
private:
Descriptor
*
descriptor
;
};
#endif
Event Timeline
Log In to Comment