Class SBCContainerUserPlan#
ClassList > SBCContainerUserPlan
This class describes a user plan.
#include <SBCContainerUserPlan.hpp>
Public Types#
| Type | Name |
|---|---|
| enum | Type The type of the user plan. |
Public Functions#
| Type | Name |
|---|---|
| SBCContainerUserPlan () noexcept Constructs the None user plan. |
|
| SBCContainerUserPlan (Type type) noexcept Constructs a user plan. |
|
| SBCContainerUserPlan (const std::string & typeString) Constructs a user plan. |
|
| SBCContainerUserPlan (const SBCContainerUserPlan & userPlan) Constructs a user plan. |
|
| Type | getType () noexcept const Returns the user plan type. |
| bool | operator!= (const SBCContainerUserPlan & userPlan) noexcept const Inequality operator. |
| std::string | operator() () noexcept const Returns the user plan as a string. |
| bool | operator< (const SBCContainerUserPlan & userPlan) noexcept const Comparison with another user plan. |
| bool | operator<= (const SBCContainerUserPlan & userPlan) noexcept const Comparison with another user plan. |
| SBCContainerUserPlan & | operator= (const SBCContainerUserPlan & userPlan) Assignment operator. |
| bool | operator== (const SBCContainerUserPlan & userPlan) noexcept const Equality operator. |
| bool | operator> (const SBCContainerUserPlan & userPlan) noexcept const Comparison with another user plan. |
| bool | operator>= (const SBCContainerUserPlan & userPlan) noexcept const Comparison with another user plan. |
| virtual | ~SBCContainerUserPlan () Destructs the user plan. |
Public Types Documentation#
enum Type#
The type of the user plan.
enum SBCContainerUserPlan::Type {
None = 0,
NoPlan = 0,
Starter = 1,
Professional = 2,
Expert = 3,
Enterprise = 4
};
Public Functions Documentation#
function SBCContainerUserPlan [1/4]#
Constructs the None user plan.
User plan class.
This class describes a user plan in SAMSON. Short name: SBUserPlan
Constructs a user plan with no plan.
function SBCContainerUserPlan [2/4]#
Constructs a user plan.
Constructs a user plan with the specified type.
Parameters:
typeThe type of the user plan.
function SBCContainerUserPlan [3/4]#
Constructs a user plan.
Constructs a user plan from its string representation.
Creates a user plan based on the textual name of the plan. Supported values are "Starter", "Professional", "Expert", and "Enterprise". If the input does not match any known plan, the plan is set to NoPlan.
Parameters:
userPlanStringThe string representing the user plan type.
function SBCContainerUserPlan [4/4]#
Constructs a user plan.
Constructs a copy of the given user plan.
Parameters:
userPlanThe user plan to copy.
function getType#
Returns the user plan type.
Returns the type of the user plan.
Returns:
The user plan type.
function operator!=#
Inequality operator.
Checks if this user plan is not equal to another.
Parameters:
userPlanThe user plan to compare with.
Returns:
true if the user plans have different types, false otherwise.
function operator()#
Returns the user plan as a string.
Returns the string representation of the user plan.
Provides the textual name associated with the current plan type. For a plan set to NoPlan, the function returns "None".
Returns:
The name of the user plan as a string.
function operator<#
Comparison with another user plan.
Checks if this user plan's type is less than another's.
Parameters:
userPlanThe user plan to compare with.
Returns:
true if this user plan's type is less, false otherwise.
function operator<=#
Comparison with another user plan.
Checks if this user plan's type is less than or equal to another's.
Parameters:
userPlanThe user plan to compare with.
Returns:
true if this user plan's type is less or equal, false otherwise.
function operator=#
Assignment operator.
Assigns the given user plan to this one.
Parameters:
userPlanThe user plan to assign from.
Returns:
Reference to this user plan.
function operator==#
Equality operator.
Checks if this user plan is equal to another.
Parameters:
userPlanThe user plan to compare with.
Returns:
true if both user plans have the same type, false otherwise.
function operator>#
Comparison with another user plan.
Checks if this user plan's type is greater than another's.
Parameters:
userPlanThe user plan to compare with.
Returns:
true if this user plan's type is greater, false otherwise.
function operator>=#
Comparison with another user plan.
Checks if this user plan's type is greater than or equal to another's.
Parameters:
userPlanThe user plan to compare with.
Returns:
true if this user plan's type is greater or equal, false otherwise.
function ~SBCContainerUserPlan#
Destructs the user plan.
Destroys the user plan.