WSF
WsfCategoryList Class Reference

Contains the 'categories' to which an object belongs. More...

#include <WsfCategoryList.hpp>

Public Types

typedef std::vector< WsfStringIdCategoryList

Public Member Functions

 WsfCategoryList ()
void Clear ()
 Clears the category list.
void JoinCategory (WsfStringId aCategoryId)
bool ProcessInput (UtInput &aInput)
bool IsCategoryMember (WsfStringId aCategoryId) const
bool Intersects (const WsfCategoryList &aOtherList) const
bool IsASubsetOf (const WsfCategoryList &aOtherList) const
const CategoryListGetCategoryList () const
 Return a the actual list.

Detailed Description

Contains the 'categories' to which an object belongs.

An object (platform, sensor, etc.) may be a member of zero or more 'categories'. Categories are generally used to associate groups of objects for the purposes of decision making. For instance, a particular category of objects may represent high value targets.

This class simply provides the mechanism maintain the category list and to determine if an object is a member of a particular category.

Member Typedef Documentation

◆ CategoryList

Constructor & Destructor Documentation

◆ WsfCategoryList()

WsfCategoryList::WsfCategoryList ( )

Referenced by Intersects(), and IsASubsetOf().

Member Function Documentation

◆ Clear()

void WsfCategoryList::Clear ( )
inline

Clears the category list.

◆ GetCategoryList()

const CategoryList & WsfCategoryList::GetCategoryList ( ) const
inline

◆ Intersects()

bool WsfCategoryList::Intersects ( const WsfCategoryList & aOtherList) const

Does another category list intersect with this category list?

Parameters
aOtherListThe other category list.
Returns
'true' if ANY category of this list matches ANY category in the other list.
'false' if either list is empty or if or if NO category in this list matches ANY category in the other list.

References WsfCategoryList().

Referenced by WsfWeaponEffects::IsVulnerable().

◆ IsASubsetOf()

bool WsfCategoryList::IsASubsetOf ( const WsfCategoryList & aOtherList) const

Is this category list completely contained within another category list?

Parameters
aOtherListThe other category list.
Returns
'true' if ALL categories of this list are contained in the other list, or if this list is empty.
'false' if ANY category of this list is NOT contained in the other list.

References WsfCategoryList().

◆ IsCategoryMember()

bool WsfCategoryList::IsCategoryMember ( WsfStringId aCategoryId) const

Determine if the associated object is a member of the indicated category.

Parameters
aCategoryIdString ID number of the category to be checked.
Returns
'true' if the object is a member of the indicated category or 'false' if not.

Referenced by WsfMilExtInterface::GetWarheadEnum(), and JoinCategory().

◆ JoinCategory()

void WsfCategoryList::JoinCategory ( WsfStringId aCategoryId)

Indicate the associated object is a member of the indicated category.

Parameters
aCategoryIdString ID number of the category of which the object is a member.

References IsCategoryMember().

Referenced by ProcessInput().

◆ ProcessInput()

bool WsfCategoryList::ProcessInput ( UtInput & aInput)

Process input from a generic source.

Examine the current input command. If it is NOT one of the commands recognized by this class then it simply returns 'false'. If it is one of the commands recognized by this class then it processes the command and returns 'true'.

Parameters
aInputa reference to a UtInput object.
Returns
'true' if the command was one recognized by the class or 'false' if not.
Exceptions
UtInput::ExceptionBase(or an object derived from it) if the command was recognized but contains some sort of error.

References JoinCategory().


The documentation for this class was generated from the following files:
Copyrights Multiple, All Rights Reserved