core: (fixes #43) Check if ObjectFactory has been configured
This commit is contained in:
@@ -60,6 +60,15 @@ ObjectFactory::SetTypeId (const char *tid)
|
||||
NS_LOG_FUNCTION (this << tid);
|
||||
m_tid = TypeId::LookupByName (tid);
|
||||
}
|
||||
bool
|
||||
ObjectFactory::IsTypeIdSet (void) const
|
||||
{
|
||||
if (m_tid.GetUid () != 0)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
void
|
||||
ObjectFactory::Set (std::string name, const AttributeValue &value)
|
||||
{
|
||||
|
||||
@@ -72,6 +72,13 @@ public:
|
||||
void SetTypeId (std::string tid);
|
||||
/**@}*/
|
||||
|
||||
/**
|
||||
* Check if the ObjectFactory has been configured with a TypeId
|
||||
*
|
||||
* \return true if a TypeId has been configured to the ObjectFactory
|
||||
*/
|
||||
bool IsTypeIdSet (void) const;
|
||||
|
||||
/**
|
||||
* Set an attribute to be set during construction.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user