Nebula
Toggle main menu visibility
Loading...
Searching...
No Matches
blobattrid.h
Go to the documentation of this file.
1
#pragma once
2
//------------------------------------------------------------------------------
12
#include "
attrid.h
"
13
14
//------------------------------------------------------------------------------
15
namespace
Attr
16
{
17
class
BlobAttrId
:
public
AttrId
18
{
19
public
:
21
BlobAttrId
(
const
AttrId
& rhs);
23
BlobAttrId
(
const
AttributeDefinition<BlobTypeClass,const Util::Blob&>
& rhs);
25
BlobAttrId
(
const
Util::String
& rhs);
27
BlobAttrId
(
const
Util::FourCC
& rhs);
29
bool
operator==
(
const
BlobAttrId
& rhs)
const
;
31
bool
operator!=
(
const
BlobAttrId
& rhs)
const
;
32
};
33
34
//------------------------------------------------------------------------------
37
inline
38
BlobAttrId::BlobAttrId
(
const
AttrId
& rhs) :
39
AttrId
(rhs)
40
{
41
// empty
42
}
43
44
//------------------------------------------------------------------------------
47
inline
48
BlobAttrId::BlobAttrId
(
const
AttributeDefinition<BlobTypeClass,const Util::Blob&>
& rhs) :
49
AttrId
(&rhs)
50
{
51
// empty
52
}
53
54
//------------------------------------------------------------------------------
57
inline
58
BlobAttrId::BlobAttrId
(
const
Util::String
& rhs)
59
{
60
this->
defPtr
=
AttributeDefinitionBase::FindByName
(rhs);
61
n_assert
(this->
GetValueType
() ==
BlobType
);
62
}
63
64
//------------------------------------------------------------------------------
67
inline
68
BlobAttrId::BlobAttrId
(
const
Util::FourCC
& rhs)
69
{
70
this->
defPtr
=
AttributeDefinitionBase::FindByFourCC
(rhs);
71
n_assert
(this->
GetValueType
() ==
BlobType
);
72
}
73
74
//------------------------------------------------------------------------------
77
inline
78
bool
79
BlobAttrId::operator==
(
const
BlobAttrId
& 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
BlobAttrId::operator!=
(
const
BlobAttrId
& 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::BlobAttrId::operator==
bool operator==(const BlobAttrId &rhs) const
equality operator
Definition
blobattrid.h:79
Attr::BlobAttrId::operator!=
bool operator!=(const BlobAttrId &rhs) const
inequality operator
Definition
blobattrid.h:90
Attr::BlobAttrId::BlobAttrId
BlobAttrId(const AttrId &rhs)
construct from generic attribute id
Definition
blobattrid.h:38
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::BlobType
@ BlobType
Definition
valuetype.h:37
Util.String
Nebula's universal string class.
Definition
String.cs:8
code
addons
attr
blobattrid.h
Generated on
for Nebula. Dark theme by
Tilen Majerle
. All rights reserved.