116{
117 GraphicalClass GraphicalClassObject;
118
119 GraphicalClassObject.GraphicalUID = QString ( Object.
UID().c_str() );
120 dunedaq::conffwk::class_t cinfo = ConfigFile->get_class_info ( Object.
class_name(),
false );
121
124
125 for ( dunedaq::conffwk::attribute_t const & attr : attributes )
126 {
128
129 if ( attr.p_name == "Name" )
130 {
131 GraphicalClassObject.DatabaseClassName =
data.at ( 0 );
132 }
133 else if ( attr.p_name == "Generic Pixmap File" )
134 {
135 GraphicalClassObject.GenericPixmapFile =
data.at ( 0 );
136 }
137 else if ( attr.p_name == "Used Pixmap File" )
138 {
139 GraphicalClassObject.UsedPixmapFile =
data.at ( 0 );
140 }
141 else if ( attr.p_name == "Icon Bitmap File" )
142 {
143 GraphicalClassObject.BitmapFile =
data.at ( 0 );
144 }
145 else if ( attr.p_name == "Icon Mask Bitmap File" )
146 {
147 GraphicalClassObject.BitmapMaskFile =
data.at ( 0 );
148 }
149 else if ( attr.p_name == "Show All Attributes" )
150 {
152 data, attr.p_int_format );
153 }
154 else if ( attr.p_name == "Attributes" )
155 {
156 GraphicalClassObject.Attributes =
data;
157 }
158 else if ( attr.p_name == "Show All Relationships" )
159 {
161 data, attr.p_int_format );
162 }
163 else if ( attr.p_name == "Relationships" )
164 {
165 GraphicalClassObject.Relationships =
data;
166
167 }
168 else if ( attr.p_name == "Icon Title" )
169 {
170 GraphicalClassObject.IconTitle =
data.at ( 0 );
171 }
172 }
173
174 for ( dunedaq::conffwk::relationship_t const & relation : relations )
175 {
177 std::vector<ConfigObject> neighboring
178 { };
179
181 {
182 neighboring.push_back (
184 }
185 else
186 {
188 std::vector<ConfigObject >> ( Object,
relation );
189 neighboring.insert ( std::end ( neighboring ), std::begin ( objects ),
190 std::end ( objects ) );
191 }
192
193 for ( ConfigObject & RelObject : neighboring )
194 {
195 dunedaq::conffwk::class_t RelClassInfo = ConfigFile->get_class_info ( RelObject.class_name(),
196 false );
197 std::vector<dunedaq::conffwk::attribute_t> AttributeRelList = RelClassInfo.
p_attributes;
198
199 if ( RelObject.class_name() == "Dual Relationship" )
200 {
201 DualRelationship DRel;
202
203 for ( dunedaq::conffwk::attribute_t & Attribute : AttributeRelList )
204 {
206 Attribute );
207
208 if ( Attribute.p_name == "Direct" )
209 {
210 DRel.Direct =
data.at ( 0 );
211 }
212 else if ( Attribute.p_name == "Reverse" )
213 {
214 DRel.Reverse =
data.at ( 0 );
215 }
216 }
217
218 GraphicalClassObject.DualRelationships.push_back ( DRel );
219 }
220 else if ( RelObject.class_name() == "Init Attribute Value" )
221 {
222 InitAttributeFromEnv IRel;
223
224 for ( dunedaq::conffwk::attribute_t & Attribute : AttributeRelList )
225 {
227 Attribute );
228
229 if ( Attribute.p_name == "Attribute Name" )
230 {
231 IRel.AttributeName =
data.at ( 0 );
232 }
233 else if ( Attribute.p_name == "Environment Variables" )
234 {
235 IRel.EnvNames =
data;
236 }
237 }
238
239 GraphicalClassObject.NeedToInitialize.push_back ( IRel );
240 }
241 }
242 }
243
244 this_graphical.emplace ( GraphicalClassObject.GraphicalUID.toStdString(),
245 GraphicalClassObject );
246
247}
friend class dbe::config::api::get::attribute
static T linked(dunedaq::conffwk::ConfigObject &item, dunedaq::conffwk::relationship_t const &relation)
const std::string & UID() const noexcept
Return object identity.
const std::string & class_name() const noexcept
Return object's class name.
std::vector< T > attributes(tref const &item)
T relation(tref item, dunedaq::conffwk::relationship_t const &relation)
std::vector< T > relations(tref const &item)
bool is_simple(dunedaq::conffwk::relationship_t const &)
bool to< bool >(QStringList const &DataList, dunedaq::conffwk::int_format_t Format)
const std::vector< attribute_t > p_attributes
const std::vector< relationship_t > p_relationships