improve doxygen.

This commit is contained in:
Mathieu Lacage
2008-03-17 17:47:45 -07:00
parent 8dc5510518
commit c8f4d234ea
3 changed files with 64 additions and 45 deletions

View File

@@ -31,7 +31,8 @@ class ObjectBase;
/**
* \brief control access to objects' trace sources
*
* This class abstracts the kind of trace source to which we want to connect.
* This class abstracts the kind of trace source to which we want to connect
* and provides services to Connect and Disconnect a sink to a trace source.
*/
class TraceSourceAccessor
{

View File

@@ -16,14 +16,12 @@ public:
IidManager ();
uint16_t AllocateUid (std::string name);
void SetParent (uint16_t uid, uint16_t parent);
void SetTypeName (uint16_t uid, std::string typeName);
void SetGroupName (uint16_t uid, std::string groupName);
void AddConstructor (uint16_t uid, ns3::Callback<ns3::ObjectBase *> callback);
void HideFromDocumentation (uint16_t uid);
uint16_t GetUid (std::string name) const;
std::string GetName (uint16_t uid) const;
uint16_t GetParent (uint16_t uid) const;
std::string GetTypeName (uint16_t uid) const;
std::string GetGroupName (uint16_t uid) const;
ns3::Callback<ns3::ObjectBase *> GetConstructor (uint16_t uid) const;
bool HasConstructor (uint16_t uid) const;
@@ -70,7 +68,6 @@ private:
struct IidInformation {
std::string name;
uint16_t parent;
std::string typeName;
std::string groupName;
bool hasConstructor;
ns3::Callback<ns3::ObjectBase *> constructor;
@@ -104,7 +101,6 @@ IidManager::AllocateUid (std::string name)
struct IidInformation information;
information.name = name;
information.parent = 0;
information.typeName = "";
information.groupName = "";
information.hasConstructor = false;
information.mustHideFromDocumentation = false;
@@ -129,12 +125,6 @@ IidManager::SetParent (uint16_t uid, uint16_t parent)
information->parent = parent;
}
void
IidManager::SetTypeName (uint16_t uid, std::string typeName)
{
struct IidInformation *information = LookupInformation (uid);
information->typeName = typeName;
}
void
IidManager::SetGroupName (uint16_t uid, std::string groupName)
{
struct IidInformation *information = LookupInformation (uid);
@@ -187,12 +177,6 @@ IidManager::GetParent (uint16_t uid) const
return information->parent;
}
std::string
IidManager::GetTypeName (uint16_t uid) const
{
struct IidInformation *information = LookupInformation (uid);
return information->typeName;
}
std::string
IidManager::GetGroupName (uint16_t uid) const
{
struct IidInformation *information = LookupInformation (uid);
@@ -464,12 +448,6 @@ TypeId::SetGroupName (std::string groupName)
return *this;
}
TypeId
TypeId::SetTypeName (std::string typeName)
{
Singleton<IidManager>::Get ()->SetTypeName (m_tid, typeName);
return *this;
}
TypeId
TypeId::GetParent (void) const
{
uint16_t parent = Singleton<IidManager>::Get ()->GetParent (m_tid);
@@ -491,12 +469,6 @@ TypeId::GetGroupName (void) const
std::string groupName = Singleton<IidManager>::Get ()->GetGroupName (m_tid);
return groupName;
}
std::string
TypeId::GetTypeName (void) const
{
std::string typeName = Singleton<IidManager>::Get ()->GetTypeName (m_tid);
return typeName;
}
std::string
TypeId::GetName (void) const

View File

@@ -90,16 +90,21 @@ public:
*/
TypeId GetParent (void) const;
/**
* \param other a parent TypeId
* \returns true if the input TypeId is really a parent
* of this TypeId, false otherwise.
*
* Calling this method is roughly similar to calling dynamic_cast
* except that you do not need object instances: you can do the check
* with TypeId instances instead.
*/
bool IsChildOf (TypeId other) const;
/**
* \returns the name of the group associated to this TypeId.
*/
std::string GetGroupName (void) const;
/**
* \returns the fully-qualified C++ typename of this TypeId.
*/
std::string GetTypeName (void) const;
/**
* \returns the name of this interface.
@@ -121,6 +126,11 @@ public:
* index is i.
*/
std::string GetAttributeName (uint32_t i) const;
/**
* \param i index into attribute array.
* \returns the help text associated to the attribute whose
* index is i.
*/
std::string GetAttributeHelp (uint32_t i) const;
/**
* \param i index into attribute array
@@ -129,21 +139,63 @@ public:
*/
std::string GetAttributeFullName (uint32_t i) const;
/**
* \param i index into attribute array.
* \returns the value with which the associated attribute
* is initialized.
*/
Attribute GetAttributeInitialValue (uint32_t i) const;
/**
* \param i index into attribute array.
* \returns the flags associated to the requested attribute.
*/
uint32_t GetAttributeFlags (uint32_t i) const;
/**
* \param i index into attribute array.
* \returns the checker associated to the requested attribute.
*/
Ptr<const AttributeChecker> GetAttributeChecker (uint32_t i) const;
uint32_t GetTraceSourceN (void) const;
std::string GetTraceSourceName (uint32_t i) const;
std::string GetTraceSourceHelp (uint32_t i) const;
Ptr<const TraceSourceAccessor> GetTraceSourceAccessor (uint32_t i) const;
/**
* \param i index into attribute array.
* \returns the accessor associated to the requested attribute.
*/
Ptr<const AttributeAccessor> GetAttributeAccessor (uint32_t i) const;
/**
* \returns a callback which can be used to instanciate an object
* of this type.
*/
Callback<ObjectBase *> GetConstructor (void) const;
/**
* \returns true if this TypeId should be hidden from the user,
* false otherwise.
*/
bool MustHideFromDocumentation (void) const;
/**
* \returns the number of trace sources defined in this TypeId.
*/
uint32_t GetTraceSourceN (void) const;
/**
* \param i index into trace source array.
* \returns the name of the requested trace source.
*/
std::string GetTraceSourceName (uint32_t i) const;
/**
* \param i index into trace source array.
* \returns the help text of the requested trace source.
*/
std::string GetTraceSourceHelp (uint32_t i) const;
/**
* \param i index into trace source array.
* \returns the accessor used to get access to the requested
* trace source.
*/
Ptr<const TraceSourceAccessor> GetTraceSourceAccessor (uint32_t i) const;
/**
* \param tid the TypeId of the base class.
* \return this TypeId instance.
@@ -170,12 +222,6 @@ public:
* scheme.
*/
TypeId SetGroupName (std::string groupName);
/**
* \param typeName the fully-qualified C++ typename of this TypeId.
* \returns this TypeId instance.
*/
TypeId SetTypeName (std::string typeName);
/**
* \returns this TypeId instance