modelgbp Generated OpFlex Model 1.7.0
EpToUnivRSrc.hpp
1
10#pragma once
11#ifndef GI_DCI_EPTOUNIVRSRC_HPP
12#define GI_DCI_EPTOUNIVRSRC_HPP
13
14#include <boost/optional.hpp>
15#include "opflex/modb/URIBuilder.h"
16#include "opflex/modb/mo-internal/MO.h"
17
18namespace modelgbp {
19namespace dci {
20
22 : public opflex::modb::mointernal::MO
23{
24public:
25
29 static const opflex::modb::class_id_t CLASS_ID = 84;
30
35 bool isRoleSet()
36 {
37 return getObjectInstance().isSet(2752514ul, opflex::modb::PropertyInfo::ENUM8);
38 }
39
44 boost::optional<const uint8_t> getRole()
45 {
46 if (isRoleSet())
47 return (const uint8_t)getObjectInstance().getUInt64(2752514ul);
48 return boost::none;
49 }
50
56 const uint8_t getRole(const uint8_t defaultValue)
57 {
58 return getRole().get_value_or(defaultValue);
59 }
60
69 modelgbp::dci::EpToUnivRSrc& setRole(const uint8_t newValue)
70 {
71 getTLMutator().modify(getClassId(), getURI())->setUInt64(2752514ul, newValue);
72 return *this;
73 }
74
82 {
83 getTLMutator().modify(getClassId(), getURI())->unset(2752514ul, opflex::modb::PropertyInfo::ENUM8, opflex::modb::PropertyInfo::SCALAR);
84 return *this;
85 }
86
92 {
93 return getObjectInstance().isSet(2752515ul, opflex::modb::PropertyInfo::REFERENCE);
94 }
95
100 boost::optional<opflex::modb::class_id_t> getTargetClass()
101 {
102 if (isTargetSet())
103 return getObjectInstance().getReference(2752515ul).first;
104 return boost::none;
105 }
106
111 boost::optional<opflex::modb::URI> getTargetURI()
112 {
113 if (isTargetSet())
114 return getObjectInstance().getReference(2752515ul).second;
115 return boost::none;
116 }
117
123 opflex::modb::class_id_t getTargetClass(opflex::modb::class_id_t defaultValue)
124 {
125 return getTargetClass().get_value_or(defaultValue);
126 }
127
133 opflex::modb::URI getTargetURI(opflex::modb::URI defaultValue)
134 {
135 return getTargetURI().get_value_or(defaultValue);
136 }
137
147 modelgbp::dci::EpToUnivRSrc& setTargetUniverse(const opflex::modb::URI& uri)
148 {
149 getTLMutator().modify(getClassId(), getURI())->setReference(2752515ul, 81, uri);
150 return *this;
151 }
152
167 )
168 {
169 getTLMutator().modify(getClassId(), getURI())->setReference(2752515ul, 81, opflex::modb::URIBuilder().addElement("DciUniverse").build());
170 return *this;
171 }
172
180 {
181 getTLMutator().modify(getClassId(), getURI())->unset(2752515ul, opflex::modb::PropertyInfo::REFERENCE, opflex::modb::PropertyInfo::SCALAR);
182 return *this;
183 }
184
190 {
191 return getObjectInstance().isSet(2752513ul, opflex::modb::PropertyInfo::ENUM8);
192 }
193
198 boost::optional<const uint8_t> getType()
199 {
200 if (isTypeSet())
201 return (const uint8_t)getObjectInstance().getUInt64(2752513ul);
202 return boost::none;
203 }
204
210 const uint8_t getType(const uint8_t defaultValue)
211 {
212 return getType().get_value_or(defaultValue);
213 }
214
223 modelgbp::dci::EpToUnivRSrc& setType(const uint8_t newValue)
224 {
225 getTLMutator().modify(getClassId(), getURI())->setUInt64(2752513ul, newValue);
226 return *this;
227 }
228
236 {
237 getTLMutator().modify(getClassId(), getURI())->unset(2752513ul, opflex::modb::PropertyInfo::ENUM8, opflex::modb::PropertyInfo::SCALAR);
238 return *this;
239 }
240
252 static boost::optional<OF_SHARED_PTR<modelgbp::dci::EpToUnivRSrc> > resolve(
253 opflex::ofcore::OFFramework& framework,
254 const opflex::modb::URI& uri)
255 {
256 return opflex::modb::mointernal::MO::resolve<modelgbp::dci::EpToUnivRSrc>(framework, CLASS_ID, uri);
257 }
258
270 static boost::optional<OF_SHARED_PTR<modelgbp::dci::EpToUnivRSrc> > resolve(
271 const opflex::modb::URI& uri)
272 {
273 return opflex::modb::mointernal::MO::resolve<modelgbp::dci::EpToUnivRSrc>(opflex::ofcore::OFFramework::defaultInstance(), CLASS_ID, uri);
274 }
275
290 static boost::optional<OF_SHARED_PTR<modelgbp::dci::EpToUnivRSrc> > resolve(
291 opflex::ofcore::OFFramework& framework)
292 {
293 return resolve(framework,opflex::modb::URIBuilder().addElement("DciDiscoverer").addElement("DciEp").addElement("DciEpToUnivRSrc").build());
294 }
295
309 static boost::optional<OF_SHARED_PTR<modelgbp::dci::EpToUnivRSrc> > resolve(
310 )
311 {
312 return resolve(opflex::ofcore::OFFramework::defaultInstance());
313 }
314
323 void remove()
324 {
325 getTLMutator().remove(CLASS_ID, getURI());
326 }
327
338 static void remove(opflex::ofcore::OFFramework& framework,
339 const opflex::modb::URI& uri)
340 {
341 MO::remove(framework, CLASS_ID, uri);
342 }
343
354 static void remove(const opflex::modb::URI& uri)
355 {
356 remove(opflex::ofcore::OFFramework::defaultInstance(), uri);
357 }
358
370 static void registerListener(
371 opflex::ofcore::OFFramework& framework,
372 opflex::modb::ObjectListener* listener)
373 {
374 opflex::modb::mointernal
375 ::MO::registerListener(framework, listener, CLASS_ID);
376 }
377
389 static void registerListener(
390 opflex::modb::ObjectListener* listener)
391 {
392 registerListener(opflex::ofcore::OFFramework::defaultInstance(), listener);
393 }
394
402 opflex::ofcore::OFFramework& framework,
403 opflex::modb::ObjectListener* listener)
404 {
405 opflex::modb::mointernal
406 ::MO::unregisterListener(framework, listener, CLASS_ID);
407 }
408
416 opflex::modb::ObjectListener* listener)
417 {
418 unregisterListener(opflex::ofcore::OFFramework::defaultInstance(), listener);
419 }
420
426 opflex::ofcore::OFFramework& framework,
427 const opflex::modb::URI& uri,
428 const OF_SHARED_PTR<const opflex::modb::mointernal::ObjectInstance>& oi)
429 : MO(framework, CLASS_ID, uri, oi) { }
430}; // class EpToUnivRSrc
431
432} // namespace dci
433} // namespace modelgbp
434#endif // GI_DCI_EPTOUNIVRSRC_HPP
Definition EpToUnivRSrc.hpp:23
EpToUnivRSrc(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri, const OF_SHARED_PTR< const opflex::modb::mointernal::ObjectInstance > &oi)
Construct an instance of EpToUnivRSrc.
Definition EpToUnivRSrc.hpp:425
static const opflex::modb::class_id_t CLASS_ID
The unique class ID for EpToUnivRSrc.
Definition EpToUnivRSrc.hpp:29
bool isTypeSet()
Check whether type has been set.
Definition EpToUnivRSrc.hpp:189
static void remove(const opflex::modb::URI &uri)
Remove the EpToUnivRSrc object with the specified URI using the currently-active mutator and the defa...
Definition EpToUnivRSrc.hpp:354
modelgbp::dci::EpToUnivRSrc & setTargetUniverse()
Set the reference to point to an instance of Universe in the currently-active mutator by constructing...
Definition EpToUnivRSrc.hpp:166
modelgbp::dci::EpToUnivRSrc & unsetType()
Unset type in the currently-active mutator.
Definition EpToUnivRSrc.hpp:235
const uint8_t getType(const uint8_t defaultValue)
Get the value of type if set, otherwise the value of default passed in.
Definition EpToUnivRSrc.hpp:210
modelgbp::dci::EpToUnivRSrc & unsetTarget()
Unset target in the currently-active mutator.
Definition EpToUnivRSrc.hpp:179
static void registerListener(opflex::ofcore::OFFramework &framework, opflex::modb::ObjectListener *listener)
Register a listener that will get called for changes related to this class.
Definition EpToUnivRSrc.hpp:370
boost::optional< opflex::modb::class_id_t > getTargetClass()
Get the value of targetClass if it has been set.
Definition EpToUnivRSrc.hpp:100
static void registerListener(opflex::modb::ObjectListener *listener)
Register a listener that will get called for changes related to this class with the default framework...
Definition EpToUnivRSrc.hpp:389
boost::optional< const uint8_t > getType()
Get the value of type if it has been set.
Definition EpToUnivRSrc.hpp:198
static void unregisterListener(opflex::modb::ObjectListener *listener)
Unregister a listener from updates to this class from the default framework instance.
Definition EpToUnivRSrc.hpp:415
boost::optional< opflex::modb::URI > getTargetURI()
Get the value of targetURI if it has been set.
Definition EpToUnivRSrc.hpp:111
static void remove(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri)
Remove the EpToUnivRSrc object with the specified URI using the currently-active mutator.
Definition EpToUnivRSrc.hpp:338
opflex::modb::URI getTargetURI(opflex::modb::URI defaultValue)
Get the value of targetURI if set, otherwise the value of default passed in.
Definition EpToUnivRSrc.hpp:133
modelgbp::dci::EpToUnivRSrc & unsetRole()
Unset role in the currently-active mutator.
Definition EpToUnivRSrc.hpp:81
const uint8_t getRole(const uint8_t defaultValue)
Get the value of role if set, otherwise the value of default passed in.
Definition EpToUnivRSrc.hpp:56
static boost::optional< OF_SHARED_PTR< modelgbp::dci::EpToUnivRSrc > > resolve(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri)
Retrieve an instance of EpToUnivRSrc from the managed object store.
Definition EpToUnivRSrc.hpp:252
static boost::optional< OF_SHARED_PTR< modelgbp::dci::EpToUnivRSrc > > resolve(opflex::ofcore::OFFramework &framework)
Retrieve an instance of EpToUnivRSrc from the managed object store by constructing its URI from the p...
Definition EpToUnivRSrc.hpp:290
boost::optional< const uint8_t > getRole()
Get the value of role if it has been set.
Definition EpToUnivRSrc.hpp:44
opflex::modb::class_id_t getTargetClass(opflex::modb::class_id_t defaultValue)
Get the value of targetClass if set, otherwise the value of default passed in.
Definition EpToUnivRSrc.hpp:123
static boost::optional< OF_SHARED_PTR< modelgbp::dci::EpToUnivRSrc > > resolve()
Retrieve an instance of EpToUnivRSrc from the default managed object store by constructing its URI fr...
Definition EpToUnivRSrc.hpp:309
static boost::optional< OF_SHARED_PTR< modelgbp::dci::EpToUnivRSrc > > resolve(const opflex::modb::URI &uri)
Retrieve an instance of EpToUnivRSrc from the managed object store using the default framework instan...
Definition EpToUnivRSrc.hpp:270
void remove()
Remove this instance using the currently-active mutator.
Definition EpToUnivRSrc.hpp:323
modelgbp::dci::EpToUnivRSrc & setType(const uint8_t newValue)
Set type to the specified value in the currently-active mutator.
Definition EpToUnivRSrc.hpp:223
bool isRoleSet()
Check whether role has been set.
Definition EpToUnivRSrc.hpp:35
modelgbp::dci::EpToUnivRSrc & setRole(const uint8_t newValue)
Set role to the specified value in the currently-active mutator.
Definition EpToUnivRSrc.hpp:69
bool isTargetSet()
Check whether target has been set.
Definition EpToUnivRSrc.hpp:91
static void unregisterListener(opflex::ofcore::OFFramework &framework, opflex::modb::ObjectListener *listener)
Unregister a listener from updates to this class.
Definition EpToUnivRSrc.hpp:401
modelgbp::dci::EpToUnivRSrc & setTargetUniverse(const opflex::modb::URI &uri)
Set the reference to point to an instance of Universe with the specified URI.
Definition EpToUnivRSrc.hpp:147
SOME COPYRIGHT.
Definition OpcodeEnumT.hpp:12