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 = 123;
37 return getObjectInstance().isSet(4030465ul, opflex::modb::PropertyInfo::STRING);
44 boost::optional<const std::string&>
getIp()
47 return getObjectInstance().getString(4030465ul);
56 const std::string&
getIp(
const std::string& defaultValue)
58 return getIp().get_value_or(defaultValue);
71 getTLMutator().modify(getClassId(), getURI())->setString(4030465ul, newValue);
83 getTLMutator().modify(getClassId(), getURI())->unset(4030465ul, opflex::modb::PropertyInfo::STRING, opflex::modb::PropertyInfo::SCALAR);
93 return getObjectInstance().isSet(4030467ul, opflex::modb::PropertyInfo::MAC);
100 boost::optional<const opflex::modb::MAC&>
getMac()
103 return getObjectInstance().getMAC(4030467ul);
112 const opflex::modb::MAC&
getMac(
const opflex::modb::MAC& defaultValue)
114 return getMac().get_value_or(defaultValue);
127 getTLMutator().modify(getClassId(), getURI())->setMAC(4030467ul, newValue);
139 getTLMutator().modify(getClassId(), getURI())->unset(4030467ul, opflex::modb::PropertyInfo::MAC, opflex::modb::PropertyInfo::SCALAR);
149 return getObjectInstance().isSet(4030466ul, opflex::modb::PropertyInfo::STRING);
159 return getObjectInstance().getString(4030466ul);
168 const std::string&
getType(
const std::string& defaultValue)
170 return getType().get_value_or(defaultValue);
183 getTLMutator().modify(getClassId(), getURI())->setString(4030466ul, newValue);
195 getTLMutator().modify(getClassId(), getURI())->unset(4030466ul, opflex::modb::PropertyInfo::STRING, opflex::modb::PropertyInfo::SCALAR);
210 static boost::optional<OF_SHARED_PTR<modelgbp::inv::Ip> >
resolve(
211 opflex::ofcore::OFFramework& framework,
212 const opflex::modb::URI& uri)
214 return opflex::modb::mointernal::MO::resolve<modelgbp::inv::Ip>(framework,
CLASS_ID, uri);
228 static boost::optional<OF_SHARED_PTR<modelgbp::inv::Ip> >
resolve(
229 const opflex::modb::URI& uri)
231 return opflex::modb::mointernal::MO::resolve<modelgbp::inv::Ip>(opflex::ofcore::OFFramework::defaultInstance(),
CLASS_ID, uri);
256 static boost::optional<OF_SHARED_PTR<modelgbp::inv::Ip> >
resolve(
257 opflex::ofcore::OFFramework& framework,
258 const std::string& invLocalEndpointInventoryName,
259 const std::string& invLocalInventoryEpUuid,
260 const std::string& invIpIp,
261 const std::string& invIpType)
263 return resolve(framework,opflex::modb::URIBuilder().addElement(
"InvUniverse").addElement(
"InvLocalEndpointInventory").addElement(invLocalEndpointInventoryName).addElement(
"InvLocalInventoryEp").addElement(invLocalInventoryEpUuid).addElement(
"InvIp").addElement(invIpIp).addElement(invIpType).build());
287 static boost::optional<OF_SHARED_PTR<modelgbp::inv::Ip> >
resolve(
288 const std::string& invLocalEndpointInventoryName,
289 const std::string& invLocalInventoryEpUuid,
290 const std::string& invIpIp,
291 const std::string& invIpType)
293 return resolve(opflex::ofcore::OFFramework::defaultInstance(),invLocalEndpointInventoryName,invLocalInventoryEpUuid,invIpIp,invIpType);
306 getTLMutator().remove(
CLASS_ID, getURI());
319 static void remove(opflex::ofcore::OFFramework& framework,
320 const opflex::modb::URI& uri)
322 MO::remove(framework,
CLASS_ID, uri);
335 static void remove(
const opflex::modb::URI& uri)
337 remove(opflex::ofcore::OFFramework::defaultInstance(), uri);
361 opflex::ofcore::OFFramework& framework,
362 const std::string& invLocalEndpointInventoryName,
363 const std::string& invLocalInventoryEpUuid,
364 const std::string& invIpIp,
365 const std::string& invIpType)
367 MO::remove(framework,
CLASS_ID, opflex::modb::URIBuilder().addElement(
"InvUniverse").addElement(
"InvLocalEndpointInventory").addElement(invLocalEndpointInventoryName).addElement(
"InvLocalInventoryEp").addElement(invLocalInventoryEpUuid).addElement(
"InvIp").addElement(invIpIp).addElement(invIpType).build());
391 const std::string& invLocalEndpointInventoryName,
392 const std::string& invLocalInventoryEpUuid,
393 const std::string& invIpIp,
394 const std::string& invIpType)
396 remove(opflex::ofcore::OFFramework::defaultInstance(),invLocalEndpointInventoryName,invLocalInventoryEpUuid,invIpIp,invIpType);
411 opflex::ofcore::OFFramework& framework,
412 opflex::modb::ObjectListener* listener)
414 opflex::modb::mointernal
415 ::MO::registerListener(framework, listener,
CLASS_ID);
430 opflex::modb::ObjectListener* listener)
442 opflex::ofcore::OFFramework& framework,
443 opflex::modb::ObjectListener* listener)
445 opflex::modb::mointernal
446 ::MO::unregisterListener(framework, listener,
CLASS_ID);
456 opflex::modb::ObjectListener* listener)
466 opflex::ofcore::OFFramework& framework,
467 const opflex::modb::URI& uri,
468 const OF_SHARED_PTR<const opflex::modb::mointernal::ObjectInstance>& oi)
469 : MO(framework,
CLASS_ID, uri, oi) { }
474 #endif // GI_INV_IP_HPP
const std::string & getType(const std::string &defaultValue)
Get the value of type if set, otherwise the value of default passed in.
Definition: Ip.hpp:168
boost::optional< const std::string & > getType()
Get the value of type if it has been set.
Definition: Ip.hpp:156
bool isMacSet()
Check whether mac has been set.
Definition: Ip.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: Ip.hpp:410
boost::optional< const opflex::modb::MAC & > getMac()
Get the value of mac if it has been set.
Definition: Ip.hpp:100
static boost::optional< OF_SHARED_PTR< modelgbp::inv::Ip > > resolve(opflex::ofcore::OFFramework &framework, const std::string &invLocalEndpointInventoryName, const std::string &invLocalInventoryEpUuid, const std::string &invIpIp, const std::string &invIpType)
Retrieve an instance of Ip from the managed object store by constructing its URI from the path elemen...
Definition: Ip.hpp:256
bool isTypeSet()
Check whether type has been set.
Definition: Ip.hpp:147
const opflex::modb::MAC & getMac(const opflex::modb::MAC &defaultValue)
Get the value of mac if set, otherwise the value of default passed in.
Definition: Ip.hpp:112
modelgbp::inv::Ip & unsetType()
Unset type in the currently-active mutator.
Definition: Ip.hpp:193
static void unregisterListener(opflex::ofcore::OFFramework &framework, opflex::modb::ObjectListener *listener)
Unregister a listener from updates to this class.
Definition: Ip.hpp:441
const std::string & getIp(const std::string &defaultValue)
Get the value of ip if set, otherwise the value of default passed in.
Definition: Ip.hpp:56
modelgbp::inv::Ip & unsetIp()
Unset ip in the currently-active mutator.
Definition: Ip.hpp:81
static void unregisterListener(opflex::modb::ObjectListener *listener)
Unregister a listener from updates to this class from the default framework instance.
Definition: Ip.hpp:455
bool isIpSet()
Check whether ip has been set.
Definition: Ip.hpp:35
Ip(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri, const OF_SHARED_PTR< const opflex::modb::mointernal::ObjectInstance > &oi)
Construct an instance of Ip.
Definition: Ip.hpp:465
modelgbp::inv::Ip & setIp(const std::string &newValue)
Set ip to the specified value in the currently-active mutator.
Definition: Ip.hpp:69
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: Ip.hpp:429
modelgbp::inv::Ip & unsetMac()
Unset mac in the currently-active mutator.
Definition: Ip.hpp:137
static boost::optional< OF_SHARED_PTR< modelgbp::inv::Ip > > resolve(const opflex::modb::URI &uri)
Retrieve an instance of Ip from the managed object store using the default framework instance...
Definition: Ip.hpp:228
modelgbp::inv::Ip & setType(const std::string &newValue)
Set type to the specified value in the currently-active mutator.
Definition: Ip.hpp:181
boost::optional< const std::string & > getIp()
Get the value of ip if it has been set.
Definition: Ip.hpp:44
static boost::optional< OF_SHARED_PTR< modelgbp::inv::Ip > > resolve(const std::string &invLocalEndpointInventoryName, const std::string &invLocalInventoryEpUuid, const std::string &invIpIp, const std::string &invIpType)
Retrieve an instance of Ip from the default managed object store by constructing its URI from the pat...
Definition: Ip.hpp:287
static const opflex::modb::class_id_t CLASS_ID
The unique class ID for Ip.
Definition: Ip.hpp:29
static boost::optional< OF_SHARED_PTR< modelgbp::inv::Ip > > resolve(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri)
Retrieve an instance of Ip from the managed object store.
Definition: Ip.hpp:210
modelgbp::inv::Ip & setMac(const opflex::modb::MAC &newValue)
Set mac to the specified value in the currently-active mutator.
Definition: Ip.hpp:125