#include <sml/restriction.h>
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< MIPRODUCTCODE > | m_AllowedProducts |
| ENUMSET< SML::USAGE, SML::USAGE_LAST > | m_Usage |
| SML::RESTRICTION::RESTRICTION | ( | ) | [inline] |
Construct an SML::RESTRICTION The default is to completely unrestricted.
| 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.
ENUMSET<SML::USAGE, SML::USAGE_LAST> SML::RESTRICTION::m_Usage [private] |
1.6.1