Cat
lbcat-cmake
CatKernel
src
Attrib.cpp
Go to the documentation of this file.
1
// $Id: $
2
//-----------------------------------------------------------------------------
3
//
4
// Package :
5
// Description:
6
//
7
// Author(s) : F. Machefert -
8
// Date : January 20, 2007
9
//
10
//-----------------------------------------------------------------------------
11
12
// Include files
13
14
#include <string>
15
#include "
Tools.h
"
16
17
// local
18
#include "
Attrib.h
"
19
20
//-----------------------------------------------------------------------------
21
// Implementation file for class : Attrib
22
//
23
// Objects Attrib
24
//
25
// 2006-10-27 :
26
//-----------------------------------------------------------------------------
27
28
//=============================================================================
29
// Standard constructor, initializes variables
30
//=============================================================================
31
Attrib::Attrib
( ) {
32
m_attribString
[0] = std::string(
"UNDEFINED"
);
33
m_attribString
[1] = std::string(
"PASSIVE"
);
34
m_attribString
[2] = std::string(
"ACTIVE"
);
35
m_attribString
[3] = std::string(
"INTERFACE"
);
36
m_attribString
[4] = std::string(
"IO"
);
37
m_attribString
[5] = std::string(
"IODATA"
);
38
m_attribString
[6] = std::string(
"ELEMENT"
);
39
m_attribString
[7] = std::string(
"HARDWARE"
);
40
m_attribString
[8] = std::string(
"PROCESSUS"
);
41
m_attribString
[9] = std::string(
"SOFTWARE"
);
42
m_attributs
.clear();
43
add
(
Attrib::UNDEFINED
);
44
}
45
46
//=============================================================================
47
// Destructor
48
//=============================================================================
49
Attrib::~Attrib
() {}
50
51
//=========================================================================
52
//
53
//=========================================================================
54
std::string
Attrib::attributs
() {
55
std::string output;
56
std::vector<int>::iterator iter ;
57
for
(
unsigned
int
index
= 0 ;
index
<
m_attributs
.size() ; ++
index
) {
58
if
(
m_attributs
.size() -
index
> 1 ) {
59
output.append(
m_attribString
[
m_attributs
[
index
]]);
60
output.append(
":"
);
61
}
62
else
{
63
output.append(
m_attribString
[
m_attributs
[
index
]]);
64
}
65
}
66
return
output;
67
}
68
//=============================================================================
Attrib::attributs
std::string attributs()
Definition:
Attrib.cpp:54
Attrib::add
void add(int attribut)
Definition:
Attrib.h:67
Attrib::~Attrib
virtual ~Attrib()
Destructor.
Definition:
Attrib.cpp:49
Attrib::UNDEFINED
Definition:
Attrib.h:30
images.index
list index
Definition:
images.py:1021
Attrib.h
Attrib::Attrib
Attrib()
Standard constructor.
Definition:
Attrib.cpp:31
Attrib::m_attribString
std::string m_attribString[10]
Definition:
Attrib.h:105
Tools.h
Attrib::m_attributs
std::vector< int > m_attributs
Definition:
Attrib.h:108
Generated by
1.8.13