Nebula
Toggle main menu visibility
Loading...
Searching...
No Matches
floatattrid.h
Go to the documentation of this file.
1
#pragma once
2
//------------------------------------------------------------------------------
12
#include "
attrid.h
"
13
14
//------------------------------------------------------------------------------
15
namespace
Attr
16
{
17
class
FloatAttrId
:
public
AttrId
18
{
19
public
:
21
FloatAttrId
(
const
AttrId
& rhs);
23
FloatAttrId
(
const
AttributeDefinition<FloatTypeClass,float>
& rhs);
25
FloatAttrId
(
const
Util::String
& rhs);
27
FloatAttrId
(
const
Util::FourCC
& rhs);
29
bool
operator==
(
const
FloatAttrId
& rhs)
const
;
31
bool
operator!=
(
const
FloatAttrId
& rhs)
const
;
32
};
33
34
//------------------------------------------------------------------------------
37
inline
38
FloatAttrId::FloatAttrId
(
const
AttrId
& rhs) :
39
AttrId
(rhs)
40
{
41
// empty
42
}
43
44
//------------------------------------------------------------------------------
47
inline
48
FloatAttrId::FloatAttrId
(
const
AttributeDefinition<FloatTypeClass, float>
& rhs) :
49
AttrId
(&rhs)
50
{
51
// empty
52
}
53
54
//------------------------------------------------------------------------------
57
inline
58
FloatAttrId::FloatAttrId
(
const
Util::String
& rhs)
59
{
60
this->
defPtr
=
AttributeDefinitionBase::FindByName
(rhs);
61
n_assert
(this->
GetValueType
() ==
FloatType
);
62
}
63
64
//------------------------------------------------------------------------------
67
inline
68
FloatAttrId::FloatAttrId
(
const
Util::FourCC
& rhs)
69
{
70
this->
defPtr
=
AttributeDefinitionBase::FindByFourCC
(rhs);
71
n_assert
(this->
GetValueType
() ==
FloatType
);
72
}
73
74
//------------------------------------------------------------------------------
77
inline
78
bool
79
FloatAttrId::operator==
(
const
FloatAttrId
& rhs)
const
80
{
81
n_assert
((0 != this->
defPtr
) && (0 != rhs.
defPtr
));
82
return
(this->
defPtr
== rhs.
defPtr
);
83
}
84
85
//------------------------------------------------------------------------------
88
inline
89
bool
90
FloatAttrId::operator!=
(
const
FloatAttrId
& rhs)
const
91
{
92
n_assert
((0 != this->
defPtr
) && (0 != rhs.
defPtr
));
93
return
(this->
defPtr
!= rhs.
defPtr
);
94
}
95
96
}
// namespace Attr
97
//------------------------------------------------------------------------------
attrid.h
Attr::AttrId::AttrId
AttrId()
default constructor
Definition
attrid.h:106
Attr::AttrId::GetValueType
ValueType GetValueType() const
get value type
Definition
attrid.h:319
Attr::AttrId::defPtr
const AttributeDefinitionBase * defPtr
Definition
attrid.h:99
Attr::AttributeDefinitionBase::FindByName
static const AttributeDefinitionBase * FindByName(const Util::String &n)
find by name
Definition
attributedefinitionbase.h:166
Attr::AttributeDefinitionBase::FindByFourCC
static const AttributeDefinitionBase * FindByFourCC(const Util::FourCC &fcc)
find by FourCC
Definition
attributedefinitionbase.h:184
Attr::AttributeDefinition
This extends the typeless AttributeDefinitionBase class by a typed template class,...
Definition
attributedefinition.h:20
Attr::FloatAttrId::operator==
bool operator==(const FloatAttrId &rhs) const
equality operator
Definition
floatattrid.h:79
Attr::FloatAttrId::FloatAttrId
FloatAttrId(const AttrId &rhs)
construct from generic attribute id
Definition
floatattrid.h:38
Attr::FloatAttrId::operator!=
bool operator!=(const FloatAttrId &rhs) const
inequality operator
Definition
floatattrid.h:90
Util::FourCC
A four-character-code is a quasi-human-readable 32-bit-id.
Definition
fourcc.h:19
n_assert
#define n_assert(exp)
Definition
debug.h:50
Attr
Definition
accessmode.h:13
Attr::FloatType
@ FloatType
Definition
valuetype.h:28
Util.String
Nebula's universal string class.
Definition
String.cs:8
code
addons
attr
floatattrid.h
Generated on
for Nebula. Dark theme by
Tilen Majerle
. All rights reserved.