11#ifndef GI_DOMAIN_CONFIGTOCONFIGRSRC_HPP
12#define GI_DOMAIN_CONFIGTOCONFIGRSRC_HPP
14#include <boost/optional.hpp>
15#include "opflex/modb/URIBuilder.h"
16#include "opflex/modb/mo-internal/MO.h"
22 :
public opflex::modb::mointernal::MO
29 static const opflex::modb::class_id_t
CLASS_ID = 57;
37 return getObjectInstance().isSet(1867778ul, opflex::modb::PropertyInfo::ENUM8);
47 return (
const uint8_t)getObjectInstance().getUInt64(1867778ul);
56 const uint8_t
getRole(
const uint8_t defaultValue)
58 return getRole().get_value_or(defaultValue);
71 getTLMutator().modify(getClassId(), getURI())->setUInt64(1867778ul, newValue);
83 getTLMutator().modify(getClassId(), getURI())->unset(1867778ul, opflex::modb::PropertyInfo::ENUM8, opflex::modb::PropertyInfo::SCALAR);
93 return getObjectInstance().isSet(1867779ul, opflex::modb::PropertyInfo::REFERENCE);
103 return getObjectInstance().getReference(1867779ul).first;
114 return getObjectInstance().getReference(1867779ul).second;
149 getTLMutator().modify(getClassId(), getURI())->setReference(1867779ul, 51, uri);
169 const std::string& platformConfigName)
171 getTLMutator().modify(getClassId(), getURI())->setReference(1867779ul, 51, opflex::modb::URIBuilder().addElement(
"PolicyUniverse").addElement(
"PlatformConfig").addElement(platformConfigName).build());
183 getTLMutator().modify(getClassId(), getURI())->unset(1867779ul, opflex::modb::PropertyInfo::REFERENCE, opflex::modb::PropertyInfo::SCALAR);
193 return getObjectInstance().isSet(1867777ul, opflex::modb::PropertyInfo::ENUM8);
203 return (
const uint8_t)getObjectInstance().getUInt64(1867777ul);
212 const uint8_t
getType(
const uint8_t defaultValue)
214 return getType().get_value_or(defaultValue);
227 getTLMutator().modify(getClassId(), getURI())->setUInt64(1867777ul, newValue);
239 getTLMutator().modify(getClassId(), getURI())->unset(1867777ul, opflex::modb::PropertyInfo::ENUM8, opflex::modb::PropertyInfo::SCALAR);
254 static boost::optional<OF_SHARED_PTR<modelgbp::domain::ConfigToConfigRSrc> >
resolve(
255 opflex::ofcore::OFFramework& framework,
256 const opflex::modb::URI& uri)
258 return opflex::modb::mointernal::MO::resolve<modelgbp::domain::ConfigToConfigRSrc>(framework,
CLASS_ID, uri);
272 static boost::optional<OF_SHARED_PTR<modelgbp::domain::ConfigToConfigRSrc> >
resolve(
273 const opflex::modb::URI& uri)
275 return opflex::modb::mointernal::MO::resolve<modelgbp::domain::ConfigToConfigRSrc>(opflex::ofcore::OFFramework::defaultInstance(),
CLASS_ID, uri);
292 static boost::optional<OF_SHARED_PTR<modelgbp::domain::ConfigToConfigRSrc> >
resolve(
293 opflex::ofcore::OFFramework& framework)
295 return resolve(framework,opflex::modb::URIBuilder().addElement(
"DomainConfig").addElement(
"DomainConfigToConfigRSrc").build());
311 static boost::optional<OF_SHARED_PTR<modelgbp::domain::ConfigToConfigRSrc> >
resolve(
314 return resolve(opflex::ofcore::OFFramework::defaultInstance());
327 getTLMutator().remove(
CLASS_ID, getURI());
340 static void remove(opflex::ofcore::OFFramework& framework,
341 const opflex::modb::URI& uri)
343 MO::remove(framework,
CLASS_ID, uri);
356 static void remove(
const opflex::modb::URI& uri)
358 remove(opflex::ofcore::OFFramework::defaultInstance(), uri);
373 opflex::ofcore::OFFramework& framework,
374 opflex::modb::ObjectListener* listener)
376 opflex::modb::mointernal
377 ::MO::registerListener(framework, listener,
CLASS_ID);
392 opflex::modb::ObjectListener* listener)
404 opflex::ofcore::OFFramework& framework,
405 opflex::modb::ObjectListener* listener)
407 opflex::modb::mointernal
408 ::MO::unregisterListener(framework, listener,
CLASS_ID);
418 opflex::modb::ObjectListener* listener)
428 opflex::ofcore::OFFramework& framework,
429 const opflex::modb::URI& uri,
430 const OF_SHARED_PTR<const opflex::modb::mointernal::ObjectInstance>& oi)
431 : MO(framework,
CLASS_ID, uri, oi) { }
Definition ConfigToConfigRSrc.hpp:23
static boost::optional< OF_SHARED_PTR< modelgbp::domain::ConfigToConfigRSrc > > resolve(const opflex::modb::URI &uri)
Retrieve an instance of ConfigToConfigRSrc from the managed object store using the default framework ...
Definition ConfigToConfigRSrc.hpp:272
modelgbp::domain::ConfigToConfigRSrc & setTargetConfig(const opflex::modb::URI &uri)
Set the reference to point to an instance of Config with the specified URI.
Definition ConfigToConfigRSrc.hpp:147
static boost::optional< OF_SHARED_PTR< modelgbp::domain::ConfigToConfigRSrc > > resolve(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri)
Retrieve an instance of ConfigToConfigRSrc from the managed object store.
Definition ConfigToConfigRSrc.hpp:254
modelgbp::domain::ConfigToConfigRSrc & unsetType()
Unset type in the currently-active mutator.
Definition ConfigToConfigRSrc.hpp:237
ConfigToConfigRSrc(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri, const OF_SHARED_PTR< const opflex::modb::mointernal::ObjectInstance > &oi)
Construct an instance of ConfigToConfigRSrc.
Definition ConfigToConfigRSrc.hpp:427
bool isRoleSet()
Check whether role has been set.
Definition ConfigToConfigRSrc.hpp:35
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 ConfigToConfigRSrc.hpp:391
modelgbp::domain::ConfigToConfigRSrc & unsetRole()
Unset role in the currently-active mutator.
Definition ConfigToConfigRSrc.hpp:81
bool isTargetSet()
Check whether target has been set.
Definition ConfigToConfigRSrc.hpp:91
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 ConfigToConfigRSrc.hpp:372
const uint8_t getRole(const uint8_t defaultValue)
Get the value of role if set, otherwise the value of default passed in.
Definition ConfigToConfigRSrc.hpp:56
void remove()
Remove this instance using the currently-active mutator.
Definition ConfigToConfigRSrc.hpp:325
static void unregisterListener(opflex::modb::ObjectListener *listener)
Unregister a listener from updates to this class from the default framework instance.
Definition ConfigToConfigRSrc.hpp:417
static void remove(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri)
Remove the ConfigToConfigRSrc object with the specified URI using the currently-active mutator.
Definition ConfigToConfigRSrc.hpp:340
modelgbp::domain::ConfigToConfigRSrc & setRole(const uint8_t newValue)
Set role to the specified value in the currently-active mutator.
Definition ConfigToConfigRSrc.hpp:69
const uint8_t getType(const uint8_t defaultValue)
Get the value of type if set, otherwise the value of default passed in.
Definition ConfigToConfigRSrc.hpp:212
boost::optional< const uint8_t > getRole()
Get the value of role if it has been set.
Definition ConfigToConfigRSrc.hpp:44
static void remove(const opflex::modb::URI &uri)
Remove the ConfigToConfigRSrc object with the specified URI using the currently-active mutator and th...
Definition ConfigToConfigRSrc.hpp:356
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 ConfigToConfigRSrc.hpp:123
modelgbp::domain::ConfigToConfigRSrc & unsetTarget()
Unset target in the currently-active mutator.
Definition ConfigToConfigRSrc.hpp:181
modelgbp::domain::ConfigToConfigRSrc & setTargetConfig(const std::string &platformConfigName)
Set the reference to point to an instance of Config in the currently-active mutator by constructing i...
Definition ConfigToConfigRSrc.hpp:168
bool isTypeSet()
Check whether type has been set.
Definition ConfigToConfigRSrc.hpp:191
modelgbp::domain::ConfigToConfigRSrc & setType(const uint8_t newValue)
Set type to the specified value in the currently-active mutator.
Definition ConfigToConfigRSrc.hpp:225
boost::optional< opflex::modb::class_id_t > getTargetClass()
Get the value of targetClass if it has been set.
Definition ConfigToConfigRSrc.hpp:100
opflex::modb::URI getTargetURI(opflex::modb::URI defaultValue)
Get the value of targetURI if set, otherwise the value of default passed in.
Definition ConfigToConfigRSrc.hpp:133
boost::optional< const uint8_t > getType()
Get the value of type if it has been set.
Definition ConfigToConfigRSrc.hpp:200
boost::optional< opflex::modb::URI > getTargetURI()
Get the value of targetURI if it has been set.
Definition ConfigToConfigRSrc.hpp:111
static const opflex::modb::class_id_t CLASS_ID
The unique class ID for ConfigToConfigRSrc.
Definition ConfigToConfigRSrc.hpp:29
static void unregisterListener(opflex::ofcore::OFFramework &framework, opflex::modb::ObjectListener *listener)
Unregister a listener from updates to this class.
Definition ConfigToConfigRSrc.hpp:403
static boost::optional< OF_SHARED_PTR< modelgbp::domain::ConfigToConfigRSrc > > resolve(opflex::ofcore::OFFramework &framework)
Retrieve an instance of ConfigToConfigRSrc from the managed object store by constructing its URI from...
Definition ConfigToConfigRSrc.hpp:292
static boost::optional< OF_SHARED_PTR< modelgbp::domain::ConfigToConfigRSrc > > resolve()
Retrieve an instance of ConfigToConfigRSrc from the default managed object store by constructing its ...
Definition ConfigToConfigRSrc.hpp:311
SOME COPYRIGHT.
Definition OpcodeEnumT.hpp:12