-
Notifications
You must be signed in to change notification settings - Fork 2
/
component.cpp
45 lines (35 loc) · 902 Bytes
/
component.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#include "component.h"
#include <stdio.h>
namespace vrok {
template <>
vrok::Property<int>::Property() : _type(PropertyType::INT) { }
template <>
vrok::Property<float>::Property() : _type(PropertyType::FLT) { }
template <>
vrok::Property<double>::Property() : _type(PropertyType::DBL) { }
void PropertyBase::SetName(std::string name) {
_name = name;
}
std::string PropertyBase::GetName() {
return _name;
}
void PropertyBase::SetPropertyInfo(const PropertyInfo &info) {
_info = info;
}
const PropertyInfo &PropertyBase::GetPropertyInfo() {
return _info;
}
uint32_t PropertyBase::Size() {
switch (GetType()) {
case PropertyType::INT:
return sizeof(int);
case PropertyType::DBL:
return sizeof(double);
case PropertyType::FLT:
return sizeof(float);
}
return 0;
}
}
vrok::Component::Component() { }
vrok::Component::~Component() { }