add TypeId::IsChildOf
This commit is contained in:
@@ -475,6 +475,16 @@ TypeId::GetParent (void) const
|
||||
uint16_t parent = Singleton<IidManager>::Get ()->GetParent (m_tid);
|
||||
return TypeId (parent);
|
||||
}
|
||||
bool
|
||||
TypeId::IsChildOf (TypeId other) const
|
||||
{
|
||||
TypeId tmp = *this;
|
||||
while (tmp != other && tmp != tmp)
|
||||
{
|
||||
tmp = tmp.GetParent ();
|
||||
}
|
||||
return tmp == other;
|
||||
}
|
||||
std::string
|
||||
TypeId::GetGroupName (void) const
|
||||
{
|
||||
|
||||
@@ -90,6 +90,8 @@ public:
|
||||
*/
|
||||
TypeId GetParent (void) const;
|
||||
|
||||
bool IsChildOf (TypeId other) const;
|
||||
|
||||
/**
|
||||
* \returns the name of the group associated to this TypeId.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user