SML::RESTRICTION Class Reference

#include <sml/restriction.h>

List of all members.

Public Member Functions

 RESTRICTION ()
void AddProduct (MIPRODUCTCODE MinimumProduct)
void AllowUsage (SML::USAGE usage)
void ClearUsage ()
void DisallowUsage (SML::USAGE usage)
bool IsAllowed (MIPRODUCTCODE CurrentProduct, SML::USAGE ScriptUsage) const
bool IsAllowed (SML::USAGE ScriptUsage) const
bool IsAllowed (MIPRODUCTCODE CurrentProduct) const

Private Attributes

SIMPLE_ARRAY< MIPRODUCTCODEm_AllowedProducts
ENUMSET< SML::USAGE,
SML::USAGE_LAST > 
m_Usage

Constructor & Destructor Documentation

SML::RESTRICTION::RESTRICTION (  )  [inline]

Construct an SML::RESTRICTION The default is to completely unrestricted.


Member Function Documentation

void SML::RESTRICTION::AddProduct ( MIPRODUCTCODE  MinimumProduct  ) 

Set the minimum product under which this restriction is allowed By default, all products are allowed.

If you add any, then only products added (and those implied by added products) will be allowed. For example, if you add TNTview, then TNTmips is impled. If you Add TNTmips but not TNTview, then it will not be allowed in TNTview.

void SML::RESTRICTION::AllowUsage ( SML::USAGE  usage  )  [inline]

Add a particular SML::USAGE to the list of allowed usags.

Note, since the RESTRICTION is set to allow all on initialization, you need to call ClearUsage before AddUsage.

void SML::RESTRICTION::ClearUsage (  )  [inline]

Disallow all SML::USAGEs.

Call this before calling AddUsage

void SML::RESTRICTION::DisallowUsage ( SML::USAGE  usage  )  [inline]

Remove a particular SML::USAGE from the list of allowed usags.

bool SML::RESTRICTION::IsAllowed ( MIPRODUCTCODE  CurrentProduct,
SML::USAGE  ScriptUsage 
) const

Determine if the restriction is allowed under the current context and script type.

bool SML::RESTRICTION::IsAllowed ( SML::USAGE  ScriptUsage  )  const

Determine if the restriction is allowed under the current script type.

bool SML::RESTRICTION::IsAllowed ( MIPRODUCTCODE  CurrentProduct  )  const

Determine if the restriction is allowed under the current product.


Member Data Documentation

ENUMSET<SML::USAGE, SML::USAGE_LAST> SML::RESTRICTION::m_Usage [private]

The documentation for this class was generated from the following file:

Generated on Sun Oct 7 21:39:17 2012 for TNTsdk 2012 by  doxygen 1.6.1