player's role type information class
More...
#include <role_type.h>
|
| enum | Type {
Goalie = 0
, Defender
, MidFielder
, Forward
,
Unknown
} |
| | role type
|
| |
| enum | Side { Center = 0
, Left = -1
, Right = 1
} |
| | position type (y position)
|
| |
|
| static std::string | to_string (const Type t) |
| | create a string value corresponding to the given role type More...
|
| |
| static std::string | to_string (const Side s) |
| | create a string value corresponding to the given side type More...
|
| |
| static Type | to_type (const std::string &str) |
| | create a role type value from the given string. More...
|
| |
| static Side | to_side (const std::string &str) |
| | create a side type value from the given string. More...
|
| |
player's role type information class
◆ RoleType()
| rcsc::RoleType::RoleType |
( |
const Type |
t, |
|
|
const Side |
s |
|
) |
| |
|
inline |
create with given values
- Parameters
-
| t | role type value |
| s | side type value |
◆ isCenter()
| bool rcsc::RoleType::isCenter |
( |
| ) |
const |
|
inline |
check if center type or not
- Returns
- true if center type
◆ isDefender()
| bool rcsc::RoleType::isDefender |
( |
| ) |
const |
|
inline |
check if defender type or not
- Returns
- true if defender
◆ isForward()
| bool rcsc::RoleType::isForward |
( |
| ) |
const |
|
inline |
check if forward type or not
- Returns
- true if forward
◆ isGoalie()
| bool rcsc::RoleType::isGoalie |
( |
| ) |
const |
|
inline |
check if goalie type or not
- Returns
- true if goalie
◆ isLeft()
| bool rcsc::RoleType::isLeft |
( |
| ) |
const |
|
inline |
check if left type or not
- Returns
- true if left type
◆ isMidFielder()
| bool rcsc::RoleType::isMidFielder |
( |
| ) |
const |
|
inline |
check if midfielder type or not
- Returns
- true if midfielder
◆ isRight()
| bool rcsc::RoleType::isRight |
( |
| ) |
const |
|
inline |
check if right type or not
- Returns
- true if right type
◆ setSide()
| void rcsc::RoleType::setSide |
( |
Side |
s | ) |
|
|
inline |
set the side type
- Parameters
-
◆ setType()
| void rcsc::RoleType::setType |
( |
Type |
t | ) |
|
|
inline |
set the role type
- Parameters
-
◆ side()
| Side rcsc::RoleType::side |
( |
| ) |
const |
|
inline |
get the side type
- Returns
- side type value
◆ to_side()
| static Side rcsc::RoleType::to_side |
( |
const std::string & |
str | ) |
|
|
static |
create a side type value from the given string.
- Returns
- role type value. Center for unsupported values
◆ to_string() [1/2]
| static std::string rcsc::RoleType::to_string |
( |
const Side |
s | ) |
|
|
static |
create a string value corresponding to the given side type
- Returns
- string value
◆ to_string() [2/2]
| static std::string rcsc::RoleType::to_string |
( |
const Type |
t | ) |
|
|
static |
create a string value corresponding to the given role type
- Returns
- string value
◆ to_type()
| static Type rcsc::RoleType::to_type |
( |
const std::string & |
str | ) |
|
|
static |
create a role type value from the given string.
- Returns
- role type value. Unknown for unsupported values
◆ type()
| Type rcsc::RoleType::type |
( |
| ) |
const |
|
inline |
get the role type
- Returns
- role type value
The documentation for this class was generated from the following file: