Technische Universität Wien
Orientation and Processing of Airborne Laser Scanning data
Department of Geodesy and Geoinformation - Research Groups Photogrammetry and Remote Sensing
distroDM
c++_api
inc
DM
IAddInfoLayout.hpp
1
#pragma once
2
3
#include "DM/config.hpp"
4
#include "DM/ColumnTypes.hpp"
5
#include "DM/Handle.hpp"
6
#include "DM/ObjectBase.hpp"
7
#include "DM/AutoLink.hpp"
//enable autolink
8
9
10
DM_NAMESPACE_BEGIN
11
12
/// \brief AddInfo layouts describe a set of attributes that can be attached to geometry objects
13
/**
14
Managing attributes, layout and views is a core feature of the DM library. Please refer to the
15
\ref dm_attributes section for implementation concepts and to the <a href="examples.html">examples</a>
16
section (attribute handling) for further details.
17
*/
18
class
DM_API
IAddInfoLayout
:
public
ObjectBase
19
{
20
public
:
21
/// returns the predefined column name for a specific semantic.
22
static
const
char
* getColumnName(
ColumnSemantic
semantic);
23
/// returns the column type of a predefined semantic
24
static
ColumnType
getColumnType(
ColumnSemantic
semantic);
25
26
/// find the semantic enumerator based on a given column name
27
/// \return corresponding enumerator of ColumnSemantic::null if the given name isn't a predefined colum name
28
static
ColumnSemantic
getColumnSemantic(
const
char
* name,
bool
caseSensitive =
true
);
29
/// find the type of a predefined column based on a given column name
30
/// \return corresponding enumerator of ColumnType::count if the given name isn't a predefined colum name
31
static
ColumnType
getColumnType(
const
char
* name,
bool
caseSensitive =
true
);
32
33
/// return from a IAddInfoLayout pointer the corresponding handle object (AddInfoLayoutHandle)
34
static
StaticHandle<IAddInfoLayout>
getHandle(
const
IAddInfoLayout
*obj);
35
36
protected
:
37
virtual
~
IAddInfoLayout
() {}
38
39
public
:
40
virtual
unsigned
columns()
const
= 0;
41
42
virtual
const
char
* name(
unsigned
index)
const
= 0;
43
virtual
ColumnType
type(
unsigned
index)
const
= 0;
44
virtual
ColumnSemantic
semantic(
unsigned
index)
const
= 0;
45
virtual
unsigned
size(
unsigned
index)
const
= 0;
///< returns array size
46
47
virtual
int
index(
const
char
*)
const
= 0;
48
virtual
int
index(
ColumnSemantic
)
const
= 0;
49
};
50
51
bool
equal
(
const
IAddInfoLayout
&l1,
const
IAddInfoLayout
&l2);
///< check if the 'viewed' content of two layouts is the same
52
53
typedef
StaticHandle<IAddInfoLayout>
AddInfoLayoutHandle
;
54
55
DM_NAMESPACE_END
DM::equal
bool equal(const IAddInfoLayout &l1, const IAddInfoLayout &l2)
check if the 'viewed' content of two layouts is the same
DM::ColumnSemantic
ColumnSemantic
Pre-defined attributes (attributes with semantic)
Definition:
ColumnTypes.hpp:38
DM::IAddInfoLayout
AddInfo layouts describe a set of attributes that can be attached to geometry objects.
Definition:
IAddInfoLayout.hpp:18
DM::StaticHandle
Definition:
Handle.hpp:427
DM::ColumnType
ColumnType
Supported attribute type.
Definition:
ColumnTypes.hpp:8
DM::ObjectBase
Definition:
M/c++_api/inc/DM/ObjectBase.hpp:8