Bitstream Interpretation Library (BIL)  0.1
Instance.cpp
Go to the documentation of this file.
1 
6 #include <xdl/model/Instance.hpp>
7 
8 using namespace bil;
9 
10 
12  m_name(),
13  m_attributes(),
14  m_tileIndex(0),
15  m_primitiveTypeIndex(0),
16  m_primitiveSiteIndex(0),
17  m_placed(false),
18  m_bonded(false)
19 {
20 
21 }
22 
23 
24 std::string& Instance::name()
25 {
26  return m_name;
27 }
28 
29 
30 const std::string& Instance::name() const
31 {
32  return m_name;
33 }
34 
35 
36 void Instance::primitiveTypeIndex(size_t index)
37 {
38  m_primitiveTypeIndex = index;
39 }
40 
41 
43 {
44  return m_primitiveTypeIndex;
45 }
46 
47 
48 void Instance::placed(bool placed)
49 {
50  m_placed = placed;
51 }
52 
53 
54 bool Instance::placed() const
55 {
56  return m_placed;
57 }
58 
59 
60 void Instance::bonded(bool bonded)
61 {
62  m_bonded = bonded;
63 }
64 
65 
66 bool Instance::bonded() const
67 {
68  return m_bonded;
69 }
70 
71 
72 void Instance::tileIndex(size_t index)
73 {
74  m_tileIndex = index;
75 }
76 
77 
78 size_t Instance::tileIndex() const
79 {
80  return m_tileIndex;
81 }
82 
83 
84 void Instance::primitiveSiteIndex(size_t index)
85 {
86  m_primitiveSiteIndex = index;
87 }
88 
89 
91 {
92  return m_primitiveSiteIndex;
93 }
94 
95 
96 std::string& Instance::attributes()
97 {
98  return m_attributes;
99 }
100 
101 
102 const std::string& Instance::attributes() const
103 {
104  return m_attributes;
105 }
106 
107 
109 {
110  m_name.clear();
111  m_primitiveTypeIndex = 0;
112  m_placed = false;
113  m_bonded = false;
114  m_tileIndex = 0;
115  m_primitiveSiteIndex = 0;
116  m_attributes.clear();
117 }