11 #ifndef GI_INV_ROUTER_HPP 12 #define GI_INV_ROUTER_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 = 132;
37 return getObjectInstance().isSet(4325377ul, opflex::modb::PropertyInfo::STRING);
44 boost::optional<const std::string&>
getName()
47 return getObjectInstance().getString(4325377ul);
56 const std::string&
getName(
const std::string& defaultValue)
58 return getName().get_value_or(defaultValue);
71 getTLMutator().modify(getClassId(), getURI())->setString(4325377ul, newValue);
83 getTLMutator().modify(getClassId(), getURI())->unset(4325377ul, opflex::modb::PropertyInfo::STRING, opflex::modb::PropertyInfo::SCALAR);
98 static boost::optional<OF_SHARED_PTR<modelgbp::inv::Router> >
resolve(
99 opflex::ofcore::OFFramework& framework,
100 const opflex::modb::URI& uri)
102 return opflex::modb::mointernal::MO::resolve<modelgbp::inv::Router>(framework,
CLASS_ID, uri);
116 static boost::optional<OF_SHARED_PTR<modelgbp::inv::Router> >
resolve(
117 const opflex::modb::URI& uri)
119 return opflex::modb::mointernal::MO::resolve<modelgbp::inv::Router>(opflex::ofcore::OFFramework::defaultInstance(),
CLASS_ID, uri);
142 static boost::optional<OF_SHARED_PTR<modelgbp::inv::Router> >
resolve(
143 opflex::ofcore::OFFramework& framework,
144 const std::string& invLocalEndpointInventoryName,
145 const std::string& invLocalInventoryEpUuid,
146 const std::string& invRouterName)
148 return resolve(framework,opflex::modb::URIBuilder().addElement(
"InvUniverse").addElement(
"InvLocalEndpointInventory").addElement(invLocalEndpointInventoryName).addElement(
"InvLocalInventoryEp").addElement(invLocalInventoryEpUuid).addElement(
"InvDHCPv4Config").addElement(
"InvRouter").addElement(invRouterName).build());
170 static boost::optional<OF_SHARED_PTR<modelgbp::inv::Router> >
resolve(
171 const std::string& invLocalEndpointInventoryName,
172 const std::string& invLocalInventoryEpUuid,
173 const std::string& invRouterName)
175 return resolve(opflex::ofcore::OFFramework::defaultInstance(),invLocalEndpointInventoryName,invLocalInventoryEpUuid,invRouterName);
188 getTLMutator().remove(
CLASS_ID, getURI());
201 static void remove(opflex::ofcore::OFFramework& framework,
202 const opflex::modb::URI& uri)
204 MO::remove(framework,
CLASS_ID, uri);
217 static void remove(
const opflex::modb::URI& uri)
219 remove(opflex::ofcore::OFFramework::defaultInstance(), uri);
241 opflex::ofcore::OFFramework& framework,
242 const std::string& invLocalEndpointInventoryName,
243 const std::string& invLocalInventoryEpUuid,
244 const std::string& invRouterName)
246 MO::remove(framework,
CLASS_ID, opflex::modb::URIBuilder().addElement(
"InvUniverse").addElement(
"InvLocalEndpointInventory").addElement(invLocalEndpointInventoryName).addElement(
"InvLocalInventoryEp").addElement(invLocalInventoryEpUuid).addElement(
"InvDHCPv4Config").addElement(
"InvRouter").addElement(invRouterName).build());
268 const std::string& invLocalEndpointInventoryName,
269 const std::string& invLocalInventoryEpUuid,
270 const std::string& invRouterName)
272 remove(opflex::ofcore::OFFramework::defaultInstance(),invLocalEndpointInventoryName,invLocalInventoryEpUuid,invRouterName);
287 opflex::ofcore::OFFramework& framework,
288 opflex::modb::ObjectListener* listener)
290 opflex::modb::mointernal
291 ::MO::registerListener(framework, listener,
CLASS_ID);
306 opflex::modb::ObjectListener* listener)
318 opflex::ofcore::OFFramework& framework,
319 opflex::modb::ObjectListener* listener)
321 opflex::modb::mointernal
322 ::MO::unregisterListener(framework, listener,
CLASS_ID);
332 opflex::modb::ObjectListener* listener)
342 opflex::ofcore::OFFramework& framework,
343 const opflex::modb::URI& uri,
344 const OF_SHARED_PTR<const opflex::modb::mointernal::ObjectInstance>& oi)
345 : MO(framework,
CLASS_ID, uri, oi) { }
350 #endif // GI_INV_ROUTER_HPP static const opflex::modb::class_id_t CLASS_ID
The unique class ID for Router.
Definition: Router.hpp:29
static boost::optional< OF_SHARED_PTR< modelgbp::inv::Router > > resolve(const std::string &invLocalEndpointInventoryName, const std::string &invLocalInventoryEpUuid, const std::string &invRouterName)
Retrieve an instance of Router from the default managed object store by constructing its URI from the...
Definition: Router.hpp:170
static boost::optional< OF_SHARED_PTR< modelgbp::inv::Router > > resolve(opflex::ofcore::OFFramework &framework, const std::string &invLocalEndpointInventoryName, const std::string &invLocalInventoryEpUuid, const std::string &invRouterName)
Retrieve an instance of Router from the managed object store by constructing its URI from the path el...
Definition: Router.hpp:142
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: Router.hpp:286
Definition: Router.hpp:21
static boost::optional< OF_SHARED_PTR< modelgbp::inv::Router > > resolve(const opflex::modb::URI &uri)
Retrieve an instance of Router from the managed object store using the default framework instance...
Definition: Router.hpp:116
boost::optional< const std::string & > getName()
Get the value of name if it has been set.
Definition: Router.hpp:44
modelgbp::inv::Router & unsetName()
Unset name in the currently-active mutator.
Definition: Router.hpp:81
static boost::optional< OF_SHARED_PTR< modelgbp::inv::Router > > resolve(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri)
Retrieve an instance of Router from the managed object store.
Definition: Router.hpp:98
modelgbp::inv::Router & setName(const std::string &newValue)
Set name to the specified value in the currently-active mutator.
Definition: Router.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: Router.hpp:305
Router(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri, const OF_SHARED_PTR< const opflex::modb::mointernal::ObjectInstance > &oi)
Construct an instance of Router.
Definition: Router.hpp:341
bool isNameSet()
Check whether name has been set.
Definition: Router.hpp:35
const std::string & getName(const std::string &defaultValue)
Get the value of name if set, otherwise the value of default passed in.
Definition: Router.hpp:56
static void unregisterListener(opflex::modb::ObjectListener *listener)
Unregister a listener from updates to this class from the default framework instance.
Definition: Router.hpp:331
static void unregisterListener(opflex::ofcore::OFFramework &framework, opflex::modb::ObjectListener *listener)
Unregister a listener from updates to this class.
Definition: Router.hpp:317
SOME COPYRIGHT.
Definition: OpcodeEnumT.hpp:12