Main Page   Namespace List   Class Hierarchy   Compound List   File List   Compound Members   File Members  

SoccerTypes Class Reference

#include <SoccerTypes.h>

List of all members.

Static Public Methods

char * getObjectStr (char *strBuf, ObjectT o, const char *strTe=NULL)
ObjectT getObjectFromStr (char **str, bool *isGoalie, const char *strTeam)
bool isInSet (ObjectT o, ObjectSetT o_s, ObjectT objectGoalie=OBJECT_TEAMMATE_1)
bool isPlayerTypeInSet (PlayerT p, PlayerSetT p_s)
bool isFlag (ObjectT o)
bool isLine (ObjectT o)
bool isGoal (ObjectT o)
ObjectT getOwnGoal (SideT s)
ObjectT getGoalOpponent (SideT s)
bool isBall (ObjectT o)
bool isTeammate (ObjectT o)
bool isOpponent (ObjectT o)
bool isGoalie (ObjectT o)
bool isPlayer (ObjectT o)
bool isKnownPlayer (ObjectT o)
int getIndex (ObjectT o)
ObjectT getTeammateObjectFromIndex (int iIndex)
ObjectT getOpponentObjectFromIndex (int iIndex)
VecPosition getGlobalPositionFlag (ObjectT o, SideT s, double dGoalWidth=14.02)
AngDeg getGlobalAngleLine (ObjectT o, SideT s)
PlayModeT getPlayModeFromStr (char *str)
PlayModeT getPlayModeFromRefereeMessage (RefereeMessageT rm)
char * getPlayModeStr (PlayModeT p)
char * getRefereeMessageStr (RefereeMessageT r)
RefereeMessageT getRefereeMessageFromStr (char *str)
char * getViewAngleStr (ViewAngleT v)
ViewAngleT getViewAngleFromStr (char *str)
AngDeg getHalfViewAngleValue (ViewAngleT va)
char * getViewQualityStr (ViewQualityT v)
ViewQualityT getViewQualityFromStr (char *str)
char * getCommandStr (CommandT com)
bool isPrimaryCommand (CommandT com)
char * getSideStr (SideT s)
SideT getSideFromStr (char *str)
char * getBallStatusStr (BallStatusT bs)
BallStatusT getBallStatusFromStr (char *str)
AngDeg getAngleFromDirection (DirectionT dir)


Detailed Description

The class SoccerTypes contains different methods to work with the different enumerations defined in SoccerTypes.h. It is possible to convert soccertypes to strings and strings to soccertypes. It is also possible to get more specific information about some of the soccertypes. All methods are static so it is possible to call the methods without instantiating the class.

Definition at line 695 of file SoccerTypes.h.


Member Function Documentation

AngDeg SoccerTypes::getAngleFromDirection DirectionT    dir [static]
 

This method returns the angle value corresponding to the direction 'dir'.

Definition at line 2255 of file SoccerTypes.cpp.

References AngDeg, DIR_EAST, DIR_ILLEGAL, DIR_NORTH, DIR_NORTHEAST, DIR_NORTHWEST, DIR_SOUTH, DIR_SOUTHEAST, DIR_SOUTHWEST, DIR_WEST, and DirectionT.

Referenced by BasicPlayer::leadingPass().

BallStatusT SoccerTypes::getBallStatusFromStr char *    str [static]
 

This method returns the BallStatus from the string that is passed as the first argument.

Parameters:
str  pointer to a string that contains ball status info at index 0
Returns:
BallStatus of string representation, BS_ILLEGAL if it is not known

Definition at line 2239 of file SoccerTypes.cpp.

References BallStatusT, BS_GOAL_LEFT, BS_GOAL_RIGHT, BS_ILLEGAL, BS_IN_FIELD, and BS_OUT_OF_FIELD.

Referenced by SenseHandler::analyzeCheckBall().

char * SoccerTypes::getBallStatusStr BallStatusT    bs [static]
 

This method returns the string representation of the BallStatus as is used in the Robocup Soccer Simulation (in_field, goal_left, goal_right or out_of_field).

Parameters:
bs  BallStatus which should be converted
Returns:
pointer to the string (enough memory should be allocated)

Definition at line 2221 of file SoccerTypes.cpp.

References BallStatusT, BS_GOAL_LEFT, BS_GOAL_RIGHT, BS_IN_FIELD, and BS_OUT_OF_FIELD.

char * SoccerTypes::getCommandStr CommandT    com [static]
 

This method returns the string representation of a CommandT as is used in the Robocup Soccer Simulation

Parameters:
com  CommandT that should be converted
Returns:
pointer to the string (enough memory should be allocated)

Definition at line 2155 of file SoccerTypes.cpp.

References CMD_ATTENTIONTO, CMD_CATCH, CMD_CHANGEVIEW, CMD_DASH, CMD_ILLEGAL, CMD_KICK, CMD_MOVE, CMD_POINTTO, CMD_SAY, CMD_SENSEBODY, CMD_TACKLE, CMD_TURN, CMD_TURNNECK, and CommandT.

AngDeg SoccerTypes::getGlobalAngleLine ObjectT    o,
SideT    s
[static]
 

This method returns the global angle of a lines on the field. The global angle differs for the left and right side. For both teams the line behind the opponent goal is seen with global angle 0. Only for the left team this is the right line and for the right team this is the left line.

Parameters:
o  one of the four line objects
s  side on which the team was started
Returns:
AngDeg global angle of this line.

Definition at line 1782 of file SoccerTypes.cpp.

References AngDeg, VecPosition::normalizeAngle(), OBJECT_LINE_B, OBJECT_LINE_L, OBJECT_LINE_R, OBJECT_LINE_T, ObjectT, SIDE_RIGHT, SideT, and UnknownAngleValue.

Referenced by WorldModel::getGlobalAngle(), and FixedObject::getGlobalAngle().

VecPosition SoccerTypes::getGlobalPositionFlag ObjectT    o,
SideT    s,
double    dGoalWidth = 14.02
[static]
 

This method returns the global position on the field of a flag (a goal is also a flag). Since the global positions for both teams differ, the side of the agent team is also needed. Note that the global positions of the flags will not change in the second half.

Parameters:
o  flag of which global position should be determined
s  side of your team.
dGoalWidth  for some flags the goalWidth is necessary (default 14.02)
Returns:
VecPosition representing the global position. x and y value are both UnknownDoubleValue when o is not a flag or goal.

Definition at line 1641 of file SoccerTypes.cpp.

References VecPosition::getX(), VecPosition::getY(), isFlag(), isGoal(), OBJECT_FLAG_B_0, OBJECT_FLAG_B_L_10, OBJECT_FLAG_B_L_20, OBJECT_FLAG_B_L_30, OBJECT_FLAG_B_L_40, OBJECT_FLAG_B_L_50, OBJECT_FLAG_B_R_10, OBJECT_FLAG_B_R_20, OBJECT_FLAG_B_R_30, OBJECT_FLAG_B_R_40, OBJECT_FLAG_B_R_50, OBJECT_FLAG_C, OBJECT_FLAG_C_B, OBJECT_FLAG_C_T, OBJECT_FLAG_G_L_B, OBJECT_FLAG_G_L_T, OBJECT_FLAG_G_R_B, OBJECT_FLAG_G_R_T, OBJECT_FLAG_L_0, OBJECT_FLAG_L_B, OBJECT_FLAG_L_B_10, OBJECT_FLAG_L_B_20, OBJECT_FLAG_L_B_30, OBJECT_FLAG_L_T, OBJECT_FLAG_L_T_10, OBJECT_FLAG_L_T_20, OBJECT_FLAG_L_T_30, OBJECT_FLAG_P_L_B, OBJECT_FLAG_P_L_C, OBJECT_FLAG_P_L_T, OBJECT_FLAG_P_R_B, OBJECT_FLAG_P_R_C, OBJECT_FLAG_P_R_T, OBJECT_FLAG_R_0, OBJECT_FLAG_R_B, OBJECT_FLAG_R_B_10, OBJECT_FLAG_R_B_20, OBJECT_FLAG_R_B_30, OBJECT_FLAG_R_T, OBJECT_FLAG_R_T_10, OBJECT_FLAG_R_T_20, OBJECT_FLAG_R_T_30, OBJECT_FLAG_T_0, OBJECT_FLAG_T_L_10, OBJECT_FLAG_T_L_20, OBJECT_FLAG_T_L_30, OBJECT_FLAG_T_L_40, OBJECT_FLAG_T_L_50, OBJECT_FLAG_T_R_10, OBJECT_FLAG_T_R_20, OBJECT_FLAG_T_R_30, OBJECT_FLAG_T_R_40, OBJECT_FLAG_T_R_50, OBJECT_GOAL_L, OBJECT_GOAL_R, ObjectT, PENALTY_AREA_LENGTH, PENALTY_AREA_WIDTH, PITCH_LENGTH, PITCH_MARGIN, PITCH_WIDTH, VecPosition::setVecPosition(), SIDE_RIGHT, SideT, and UnknownDoubleValue.

Referenced by Player::deMeer5_goalie(), WorldModel::getGlobalPosition(), FixedObject::getGlobalPosition(), WorldModel::getPosOpponentGoal(), WorldModel::getPosOwnGoal(), WorldModel::getRelAngleOpponentGoal(), WorldModel::isInOwnPenaltyArea(), and WorldModel::isInTheirPenaltyArea().

ObjectT SoccerTypes::getGoalOpponent SideT    s [static]
 

This method returns the object representing the opponent goal

Parameters:
s  own side
Returns:
object of the goal opponent, OBJECT_ILLEGAL when s is SIDE_ILLEGAL

Definition at line 1621 of file SoccerTypes.cpp.

References OBJECT_GOAL_L, OBJECT_GOAL_R, OBJECT_ILLEGAL, ObjectT, SIDE_LEFT, SIDE_RIGHT, and SideT.

Referenced by WorldModel::getPosOpponentGoal().

AngDeg SoccerTypes::getHalfViewAngleValue ViewAngleT    va [static]
 

This method returns the half angle value that belongs to the ViewAngle that is given as the first argument (VA_NARROW, VA_NORMAL or VA_WIDE). The half view angle is returned since this makes it easier to check whether an object lies in the view cone (the global relative angle must be smaller than the half view angle.

Parameters:
va  view angle
Returns:
angle denoting the half of the corresponding view angle

Definition at line 2112 of file SoccerTypes.cpp.

References AngDeg, VA_ILLEGAL, VA_NARROW, VA_NORMAL, VA_WIDE, and ViewAngleT.

Referenced by WorldModel::removeGhosts().

int SoccerTypes::getIndex ObjectT    o [static]
 

This method returns the index of an object relative to the first object in that set. The index is always 1 smaller than its number, so OBJECT_OPPONENT_1 will become 0. This can be used for indexing an array of objects.

Parameters:
o  ObjectT type of object of which the index has to be calculated
Returns:
index of object or -1 when o was not a correct object

Definition at line 1437 of file SoccerTypes.cpp.

References OBJECT_FLAG_C, OBJECT_FLAG_L_T, OBJECT_GOAL_L, OBJECT_GOAL_R, OBJECT_LINE_L, OBJECT_LINE_T, OBJECT_OPPONENT_1, OBJECT_OPPONENT_11, OBJECT_TEAMMATE_1, OBJECT_TEAMMATE_11, and ObjectT.

Referenced by WorldModel::drawCoordinationGraph(), WorldModel::getAgentIndex(), WorldModel::getMaxRangeUnknownPlayer(), WorldModel::getObjectPtrFromType(), getObjectStr(), Formations::getPlayerInFormation(), WorldModel::getPlayerType(), Formations::getPlayerType(), WorldModel::getStrategicPosition(), PlayerObject::isInRange(), BasicPlayer::listenTo(), WorldModel::logCoordInfo(), WorldModel::logObjectInformation(), WorldModel::mapUnknownPlayers(), BasicPlayer::outplayOpponent(), WorldModel::processNewObjectInfo(), WorldModel::removeGhosts(), Player::sayOppAttackerStatus(), and WorldModel::updateAfterSenseMessage().

ObjectT SoccerTypes::getObjectFromStr char **    str,
bool *    isGoalie,
const char *    strMyTeamName
[static]
 

This method returns an ObjectT that corresponds to the string passed as the first argument. The string representation equals the representation used in the Soccer Server. Format is with parenthesis, so possible arguments for str are (ball), (p Team_L 1), etc.

Parameters:
str  pointer to string containing string representation of object
isGoalie  bool representing the fact whether object is a goalie
strMyTeamName  in case of player or opponent object, own teamname has to be matched, when it matches it is teammate otherwise opponent
Returns:
return the corresponding ObjectT, OBJECT_ILLEGAL in case of error

Definition at line 1185 of file SoccerTypes.cpp.

References Parse::gotoFirstOccurenceOf(), Parse::gotoFirstSpaceOrClosingBracket(), isGoalie(), OBJECT_BALL, OBJECT_FLAG_B_0, OBJECT_FLAG_B_L_10, OBJECT_FLAG_B_L_20, OBJECT_FLAG_B_L_30, OBJECT_FLAG_B_L_40, OBJECT_FLAG_B_L_50, OBJECT_FLAG_B_R_10, OBJECT_FLAG_B_R_20, OBJECT_FLAG_B_R_30, OBJECT_FLAG_B_R_40, OBJECT_FLAG_B_R_50, OBJECT_FLAG_C, OBJECT_FLAG_C_B, OBJECT_FLAG_C_T, OBJECT_FLAG_G_L_B, OBJECT_FLAG_G_L_T, OBJECT_FLAG_G_R_B, OBJECT_FLAG_G_R_T, OBJECT_FLAG_L_0, OBJECT_FLAG_L_B, OBJECT_FLAG_L_B_10, OBJECT_FLAG_L_B_20, OBJECT_FLAG_L_B_30, OBJECT_FLAG_L_T, OBJECT_FLAG_L_T_10, OBJECT_FLAG_L_T_20, OBJECT_FLAG_L_T_30, OBJECT_FLAG_P_L_B, OBJECT_FLAG_P_L_C, OBJECT_FLAG_P_L_T, OBJECT_FLAG_P_R_B, OBJECT_FLAG_P_R_C, OBJECT_FLAG_P_R_T, OBJECT_FLAG_R_0, OBJECT_FLAG_R_B, OBJECT_FLAG_R_B_10, OBJECT_FLAG_R_B_20, OBJECT_FLAG_R_B_30, OBJECT_FLAG_R_T, OBJECT_FLAG_R_T_10, OBJECT_FLAG_R_T_20, OBJECT_FLAG_R_T_30, OBJECT_FLAG_T_0, OBJECT_FLAG_T_L_10, OBJECT_FLAG_T_L_20, OBJECT_FLAG_T_L_30, OBJECT_FLAG_T_L_40, OBJECT_FLAG_T_L_50, OBJECT_FLAG_T_R_10, OBJECT_FLAG_T_R_20, OBJECT_FLAG_T_R_30, OBJECT_FLAG_T_R_40, OBJECT_FLAG_T_R_50, OBJECT_GOAL_L, OBJECT_GOAL_R, OBJECT_GOAL_UNKNOWN, OBJECT_ILLEGAL, OBJECT_LINE_B, OBJECT_LINE_L, OBJECT_LINE_R, OBJECT_LINE_T, OBJECT_OPPONENT_1, OBJECT_OPPONENT_10, OBJECT_OPPONENT_11, OBJECT_OPPONENT_2, OBJECT_OPPONENT_3, OBJECT_OPPONENT_4, OBJECT_OPPONENT_5, OBJECT_OPPONENT_6, OBJECT_OPPONENT_7, OBJECT_OPPONENT_8, OBJECT_OPPONENT_9, OBJECT_OPPONENT_UNKNOWN, OBJECT_PLAYER_UNKNOWN, OBJECT_TEAMMATE_1, OBJECT_TEAMMATE_10, OBJECT_TEAMMATE_11, OBJECT_TEAMMATE_2, OBJECT_TEAMMATE_3, OBJECT_TEAMMATE_4, OBJECT_TEAMMATE_5, OBJECT_TEAMMATE_6, OBJECT_TEAMMATE_7, OBJECT_TEAMMATE_8, OBJECT_TEAMMATE_9, OBJECT_TEAMMATE_UNKNOWN, OBJECT_UNKNOWN, ObjectT, and Parse::parseFirstInt().

Referenced by SenseHandler::analyzeFullStateMessage(), SenseHandler::analyzeSeeGlobalMessage(), WorldModel::getMaxRangeUnknownPlayer(), and WorldModel::processLastSeeMessage().

char * SoccerTypes::getObjectStr char *    strBuf,
ObjectT    o,
const char *    strTeamName = NULL
[static]
 

This method returns the string that corresponds to a specific object. This string name is exactly the same as the (short) name of the RoboCup Simulation.

Parameters:
strBuf  is the string in which the string representation is stored
o  ObjectT that has to be converted to the string representation
strTeamName  teamname that should be placed in case of player object
Returns:
pointer to strBuf, which contains the string representation

Definition at line 1150 of file SoccerTypes.cpp.

References getIndex(), isKnownPlayer(), isOpponent(), isTeammate(), OBJECT_BALL, OBJECT_FLAG_C, OBJECT_OPPONENT_UNKNOWN, OBJECT_PLAYER_UNKNOWN, OBJECT_TEAMMATE_UNKNOWN, OBJECT_UNKNOWN, ObjectNames, and ObjectT.

Referenced by WorldModel::drawCoordinationGraph(), WorldModel::predictNrCyclesToPoint(), AgentObject::show(), BallObject::show(), PlayerObject::show(), and FixedObject::show().

ObjectT SoccerTypes::getOpponentObjectFromIndex int    iIndex [static]
 

This method returns the object type of an opponent with index iIndex. When iIndex equals 9 for example OBJECT_OPPONENT_10 is returned.

Parameters:
iIndex  index of opponent range is [0..10]
Returns:
object type corresponding to this index

Definition at line 1466 of file SoccerTypes.cpp.

References OBJECT_OPPONENT_1, and ObjectT.

Referenced by SenseHandler::analyzeChangePlayerTypeMessage(), WorldModel::getMaxRangeUnknownPlayer(), WorldModel::processPlayerMessage(), and WorldModel::WorldModel().

ObjectT SoccerTypes::getOwnGoal SideT    s [static]
 

This method returns the object representing the own goal

Parameters:
s  own side
Returns:
object of the own goal, OBJECT_ILLEGAL when s is SIDE_ILLEGAL

Definition at line 1605 of file SoccerTypes.cpp.

References OBJECT_GOAL_L, OBJECT_GOAL_R, OBJECT_ILLEGAL, ObjectT, SIDE_LEFT, SIDE_RIGHT, and SideT.

Referenced by WorldModel::getPosOwnGoal().

PlayModeT SoccerTypes::getPlayModeFromRefereeMessage RefereeMessageT    rm [static]
 

This method returns the play mode from the referee message.

Parameters:
rm  RefereeMessage that contains the play mode
Returns:
PlayModeT of RefereeMessage, PM_ILLEGAL if it is not recognized

Definition at line 1859 of file SoccerTypes.cpp.

References PlayModeT, PM_BACK_PASS_LEFT, PM_BACK_PASS_RIGHT, PM_BEFORE_KICK_OFF, PM_CORNER_KICK_LEFT, PM_CORNER_KICK_RIGHT, PM_FREE_KICK_FAULT_LEFT, PM_FREE_KICK_FAULT_RIGHT, PM_FREE_KICK_LEFT, PM_FREE_KICK_RIGHT, PM_FROZEN, PM_GOAL_KICK_LEFT, PM_GOAL_KICK_RIGHT, PM_GOAL_LEFT, PM_GOAL_RIGHT, PM_ILLEGAL, PM_INDIRECT_FREE_KICK_LEFT, PM_INDIRECT_FREE_KICK_RIGHT, PM_KICK_IN_LEFT, PM_KICK_IN_RIGHT, PM_KICK_OFF_LEFT, PM_KICK_OFF_RIGHT, PM_OFFSIDE_LEFT, PM_OFFSIDE_RIGHT, PM_PENALTY_READY_LEFT, PM_PENALTY_READY_RIGHT, PM_PENALTY_SETUP_LEFT, PM_PENALTY_SETUP_RIGHT, PM_PENALTY_TAKEN_LEFT, PM_PENALTY_TAKEN_RIGHT, PM_PLAY_ON, PM_QUIT, PM_TIME_OVER, REFC_BACK_PASS_LEFT, REFC_BACK_PASS_RIGHT, REFC_BEFORE_KICK_OFF, REFC_CORNER_KICK_LEFT, REFC_CORNER_KICK_RIGHT, REFC_FOUL_LEFT, REFC_FOUL_RIGHT, REFC_FREE_KICK_FAULT_LEFT, REFC_FREE_KICK_FAULT_RIGHT, REFC_FREE_KICK_LEFT, REFC_FREE_KICK_RIGHT, REFC_FROZEN, REFC_GOAL_KICK_LEFT, REFC_GOAL_KICK_RIGHT, REFC_GOAL_LEFT, REFC_GOAL_RIGHT, REFC_INDIRECT_FREE_KICK_LEFT, REFC_INDIRECT_FREE_KICK_RIGHT, REFC_KICK_IN_LEFT, REFC_KICK_IN_RIGHT, REFC_KICK_OFF_LEFT, REFC_KICK_OFF_RIGHT, REFC_OFFSIDE_LEFT, REFC_OFFSIDE_RIGHT, REFC_PENALTY_READY_LEFT, REFC_PENALTY_READY_RIGHT, REFC_PENALTY_SETUP_LEFT, REFC_PENALTY_SETUP_RIGHT, REFC_PENALTY_TAKEN_LEFT, REFC_PENALTY_TAKEN_RIGHT, REFC_PLAY_ON, REFC_QUIT, REFC_TIME_OVER, and RefereeMessageT.

Referenced by SenseHandler::analyzeFullStateMessage(), SenseHandler::analyzeHearMessage(), and getPlayModeFromStr().

PlayModeT SoccerTypes::getPlayModeFromStr char *    str [static]
 

This method returns the play mode associated with a string.

Parameters:
str  representing the play mode
Returns:
PlayModeT of string, PM_ILLEGAL if it is not recognized

Definition at line 1849 of file SoccerTypes.cpp.

References getPlayModeFromRefereeMessage(), getRefereeMessageFromStr(), and PlayModeT.

Referenced by SenseHandler::analyzeInitMessage().

char * SoccerTypes::getPlayModeStr PlayModeT    pm [static]
 

This method returns the string representation of a PlayModeT as is used in the Robocup Soccer Simulation and also said by the referee.

Parameters:
pm  PlayModeT which should be converted
Returns:
pointer to the string (enough memory has to be allocated)

Definition at line 1807 of file SoccerTypes.cpp.

References PlayModeT, PM_BACK_PASS_LEFT, PM_BACK_PASS_RIGHT, PM_BEFORE_KICK_OFF, PM_CORNER_KICK_LEFT, PM_CORNER_KICK_RIGHT, PM_FREE_KICK_FAULT_LEFT, PM_FREE_KICK_FAULT_RIGHT, PM_FREE_KICK_LEFT, PM_FREE_KICK_RIGHT, PM_FROZEN, PM_GOAL_KICK_LEFT, PM_GOAL_KICK_RIGHT, PM_GOAL_LEFT, PM_GOAL_RIGHT, PM_ILLEGAL, PM_INDIRECT_FREE_KICK_LEFT, PM_INDIRECT_FREE_KICK_RIGHT, PM_KICK_IN_LEFT, PM_KICK_IN_RIGHT, PM_KICK_OFF_LEFT, PM_KICK_OFF_RIGHT, PM_OFFSIDE_LEFT, PM_OFFSIDE_RIGHT, PM_PENALTY_READY_LEFT, PM_PENALTY_READY_RIGHT, PM_PENALTY_SETUP_LEFT, PM_PENALTY_SETUP_RIGHT, PM_PENALTY_TAKEN_LEFT, PM_PENALTY_TAKEN_RIGHT, PM_PLAY_ON, and PM_QUIT.

Referenced by WorldModel::show().

RefereeMessageT SoccerTypes::getRefereeMessageFromStr char *    str [static]
 

This method returns the referee message from the string that is passed.

Parameters:
str  pointer to a string with the referee message starting at index 0
Returns:
RefereeMessageT of string representation, REFC_ILLEGAL if it fails

Definition at line 1970 of file SoccerTypes.cpp.

References REFC_BACK_PASS_LEFT, REFC_BACK_PASS_RIGHT, REFC_BEFORE_KICK_OFF, REFC_CORNER_KICK_LEFT, REFC_CORNER_KICK_RIGHT, REFC_DROP_BALL, REFC_FOUL_LEFT, REFC_FOUL_RIGHT, REFC_FREE_KICK_FAULT_LEFT, REFC_FREE_KICK_FAULT_RIGHT, REFC_FREE_KICK_LEFT, REFC_FREE_KICK_RIGHT, REFC_GOAL_KICK_LEFT, REFC_GOAL_KICK_RIGHT, REFC_GOAL_LEFT, REFC_GOAL_RIGHT, REFC_GOALIE_CATCH_BALL_LEFT, REFC_GOALIE_CATCH_BALL_RIGHT, REFC_HALF_TIME, REFC_ILLEGAL, REFC_INDIRECT_FREE_KICK_LEFT, REFC_INDIRECT_FREE_KICK_RIGHT, REFC_KICK_IN_LEFT, REFC_KICK_IN_RIGHT, REFC_KICK_OFF_LEFT, REFC_KICK_OFF_RIGHT, REFC_OFFSIDE_LEFT, REFC_OFFSIDE_RIGHT, REFC_PENALTY_DRAW, REFC_PENALTY_FOUL_LEFT, REFC_PENALTY_FOUL_RIGHT, REFC_PENALTY_MISS_LEFT, REFC_PENALTY_MISS_RIGHT, REFC_PENALTY_ONFIELD_LEFT, REFC_PENALTY_ONFIELD_RIGHT, REFC_PENALTY_READY_LEFT, REFC_PENALTY_READY_RIGHT, REFC_PENALTY_SCORE_LEFT, REFC_PENALTY_SCORE_RIGHT, REFC_PENALTY_SETUP_LEFT, REFC_PENALTY_SETUP_RIGHT, REFC_PENALTY_TAKEN_LEFT, REFC_PENALTY_TAKEN_RIGHT, REFC_PENALTY_WINNER_LEFT, REFC_PENALTY_WINNER_RIGHT, REFC_PLAY_ON, REFC_TIME_EXTENDED, REFC_TIME_OVER, REFC_TIME_UP, REFC_TIME_UP_WITHOUT_A_TEAM, and RefereeMessageT.

Referenced by SenseHandler::analyzeFullStateMessage(), SenseHandler::analyzeHearMessage(), and getPlayModeFromStr().

char * SoccerTypes::getRefereeMessageStr RefereeMessageT    rm [static]
 

This method returns the string representation of a RefereeMessageT as is used in the Robocup Soccer Simulation and said by the referee.

Parameters:
pm  RefereeMessageT which should be converted
Returns:
pointer to the string (enough memory should be allocated)

Definition at line 1904 of file SoccerTypes.cpp.

References REFC_BACK_PASS_LEFT, REFC_BACK_PASS_RIGHT, REFC_BEFORE_KICK_OFF, REFC_CORNER_KICK_LEFT, REFC_CORNER_KICK_RIGHT, REFC_DROP_BALL, REFC_FOUL_LEFT, REFC_FOUL_RIGHT, REFC_FREE_KICK_FAULT_LEFT, REFC_FREE_KICK_FAULT_RIGHT, REFC_FREE_KICK_LEFT, REFC_FREE_KICK_RIGHT, REFC_FROZEN, REFC_GOAL_KICK_LEFT, REFC_GOAL_KICK_RIGHT, REFC_GOAL_LEFT, REFC_GOAL_RIGHT, REFC_GOALIE_CATCH_BALL_LEFT, REFC_GOALIE_CATCH_BALL_RIGHT, REFC_HALF_TIME, REFC_ILLEGAL, REFC_INDIRECT_FREE_KICK_LEFT, REFC_INDIRECT_FREE_KICK_RIGHT, REFC_KICK_IN_LEFT, REFC_KICK_IN_RIGHT, REFC_KICK_OFF_LEFT, REFC_KICK_OFF_RIGHT, REFC_OFFSIDE_LEFT, REFC_OFFSIDE_RIGHT, REFC_PENALTY_DRAW, REFC_PENALTY_FOUL_LEFT, REFC_PENALTY_FOUL_RIGHT, REFC_PENALTY_MISS_LEFT, REFC_PENALTY_MISS_RIGHT, REFC_PENALTY_ONFIELD_LEFT, REFC_PENALTY_ONFIELD_RIGHT, REFC_PENALTY_READY_LEFT, REFC_PENALTY_READY_RIGHT, REFC_PENALTY_SCORE_LEFT, REFC_PENALTY_SCORE_RIGHT, REFC_PENALTY_SETUP_LEFT, REFC_PENALTY_SETUP_RIGHT, REFC_PENALTY_TAKEN_LEFT, REFC_PENALTY_TAKEN_RIGHT, REFC_PENALTY_WINNER_LEFT, REFC_PENALTY_WINNER_RIGHT, REFC_PLAY_ON, REFC_QUIT, REFC_TIME_EXTENDED, REFC_TIME_OVER, REFC_TIME_UP, REFC_TIME_UP_WITHOUT_A_TEAM, and RefereeMessageT.

Referenced by SenseHandler::analyzeHearMessage().

SideT SoccerTypes::getSideFromStr char *    str [static]
 

This method returns the SideT from the string that is passed as the first argument.

Parameters:
str  pointer to a string that contains side info string at index 0
Returns:
SideT of string representation, SIDE_ILLEGAL if it is not known

Definition at line 2208 of file SoccerTypes.cpp.

References SIDE_ILLEGAL, SIDE_LEFT, SIDE_RIGHT, and SideT.

Referenced by SenseHandler::analyzeInitMessage().

char * SoccerTypes::getSideStr SideT    s [static]
 

This method returns the string representation of a SideT as is used in the Robocup Soccer Simulation (r or l).

Parameters:
s  SideT which should be converted
Returns:
pointer to the string

Definition at line 2193 of file SoccerTypes.cpp.

References SIDE_ILLEGAL, SIDE_LEFT, SIDE_RIGHT, and SideT.

Referenced by WorldModel::show().

ObjectT SoccerTypes::getTeammateObjectFromIndex int    iIndex [static]
 

This method returns the object type of a teammate with index iIndex. When iIndex equals 3 for example OBJECT_TEAMMATE_4 is returned.

Parameters:
iIndex  index of teammate range is [0..10]
Returns:
object type corresponding to this index

Definition at line 1457 of file SoccerTypes.cpp.

References OBJECT_TEAMMATE_1, and ObjectT.

Referenced by SenseHandler::analyzeChangePlayerTypeMessage(), SenseHandler::analyzeInitMessage(), WorldModel::getClosestPlayerInFormationTo(), WorldModel::getMaxRangeUnknownPlayer(), WorldModel::getStrategicPosition(), WorldModel::processLastSenseMessage(), and WorldModel::WorldModel().

ViewAngleT SoccerTypes::getViewAngleFromStr char *    str [static]
 

This method returns et the view angle from the specified string

Parameters:
str  pointer to a string that contains view angle string at index 0
Returns:
ViewAngleT of string, VA_ILLEGAL if it is not recognized

Definition at line 2092 of file SoccerTypes.cpp.

References VA_ILLEGAL, VA_NARROW, VA_NORMAL, VA_WIDE, and ViewAngleT.

Referenced by SenseHandler::analyzeFullStateMessage(), Player::executeStringCommand(), and WorldModel::processLastSenseMessage().

char * SoccerTypes::getViewAngleStr ViewAngleT    va [static]
 

This method returns the string representation of a ViewAngleT as is used in the Robocup Soccer Simulation

Parameters:
va  ViewAngleT which should be converted
Returns:
pointer to the string (enough memory should be allocatd)

Definition at line 2077 of file SoccerTypes.cpp.

References VA_ILLEGAL, VA_NARROW, VA_NORMAL, VA_WIDE, and ViewAngleT.

Referenced by SoccerCommand::makeChangeViewCommand().

ViewQualityT SoccerTypes::getViewQualityFromStr char *    str [static]
 

This method returns the view quality from the string that is passed as the first argument

Parameters:
str  pointer to a string that contains view quality string at index 0
Returns:
ViewQualityT of string, VQ_ILLEGAL if it is not known

Definition at line 2144 of file SoccerTypes.cpp.

References ViewQualityT, VQ_HIGH, VQ_ILLEGAL, and VQ_LOW.

Referenced by SenseHandler::analyzeFullStateMessage(), Player::executeStringCommand(), and WorldModel::processLastSenseMessage().

char * SoccerTypes::getViewQualityStr ViewQualityT    vq [static]
 

This method returns the string representation of a ViewQualityT as is used in the Robocup Soccer Simulation

Parameters:
vq  ViewQualityT which should be converted
Returns:
pointer to the string (enough memory should be allocated)

Definition at line 2129 of file SoccerTypes.cpp.

References ViewQualityT, VQ_HIGH, VQ_ILLEGAL, and VQ_LOW.

Referenced by SoccerCommand::makeChangeViewCommand().

bool SoccerTypes::isBall ObjectT    o [static]
 

This method determines whether object o is the ball

Parameters:
o  an object type
Returns:
bool indicating whether o is the ball (true) or not (false)

Definition at line 1597 of file SoccerTypes.cpp.

References OBJECT_BALL, and ObjectT.

Referenced by WorldModel::getObjectPtrFromType(), WorldModel::processNewObjectInfo(), WorldModel::processPerfectHearInfo(), WorldModel::processSeeGlobalInfo(), and WorldModel::updateDynamicObjectForNextCycle().

bool SoccerTypes::isFlag ObjectT    o [static]
 

This method determines whether object o is a flag.

Parameters:
o  an object type
Returns:
bool indicating whether o is a flag (return true) or not (false)

Definition at line 1523 of file SoccerTypes.cpp.

References OBJECT_FLAG_C, OBJECT_FLAG_L_T, OBJECT_GOAL_L, OBJECT_GOAL_R, and ObjectT.

Referenced by WorldModel::getGlobalPosition(), getGlobalPositionFlag(), WorldModel::getObjectPtrFromType(), isInSet(), and WorldModel::processNewObjectInfo().

bool SoccerTypes::isGoal ObjectT    o [static]
 

This method determines whether object o is a goal

Parameters:
o  an object type
Returns:
bool indicating whether o is a goal (return true) or not (false)

Definition at line 1540 of file SoccerTypes.cpp.

References OBJECT_GOAL_L, OBJECT_GOAL_R, and ObjectT.

Referenced by WorldModel::getGlobalPosition(), and getGlobalPositionFlag().

bool SoccerTypes::isGoalie ObjectT    o [static]
 

This method determines whether object o is a goalie = teammate number is 1 (for now)

Parameters:
o  an object type
Returns:
bool indicating whether o is a goalie (true) or not (false)

Definition at line 1589 of file SoccerTypes.cpp.

References OBJECT_OPPONENT_1, OBJECT_TEAMMATE_1, and ObjectT.

Referenced by getObjectFromStr().

bool SoccerTypes::isInSet ObjectT    o,
ObjectSetT    o_g,
ObjectT    objGoalie = OBJECT_TEAMMATE_1
[static]
 

This method returns a boolean indicating whether the object o is part of the object set o_s. OBJECT_TEAMMATE_1 as o and OBJECT_SET_TEAMMATES will return for example the value true.

Parameters:
o  ObjectT of which should be checked whether it is a part of o_s
o_s  ObjectSet in which o should be
Returns:
true when o is included in set o_s, false otherwise

Definition at line 1478 of file SoccerTypes.cpp.

References isFlag(), isKnownPlayer(), isLine(), isOpponent(), isPlayer(), isTeammate(), OBJECT_SET_FLAGS, OBJECT_SET_ILLEGAL, OBJECT_SET_LINES, OBJECT_SET_OPPONENTS, OBJECT_SET_PLAYERS, OBJECT_SET_TEAMMATES, OBJECT_SET_TEAMMATES_NO_GOALIE, ObjectSetT, and ObjectT.

Referenced by WorldModel::iterateObjectNext().

bool SoccerTypes::isKnownPlayer ObjectT    o [static]
 

This method determines whether object o is a known player, thus containing a number

Parameters:
o  an object type
Returns:
bool indicating whether o is a known player (true) or not (false)

Definition at line 1579 of file SoccerTypes.cpp.

References OBJECT_OPPONENT_1, OBJECT_OPPONENT_11, OBJECT_TEAMMATE_1, OBJECT_TEAMMATE_11, and ObjectT.

Referenced by WorldModel::getHeteroInfoPlayer(), WorldModel::getMaxRangeUnknownPlayer(), WorldModel::getObjectPtrFromType(), getObjectStr(), isInSet(), isPlayer(), BasicPlayer::listenTo(), WorldModel::mapUnknownPlayers(), WorldModel::predictPosAfterNrCycles(), WorldModel::processLastSeeMessage(), WorldModel::processNewObjectInfo(), WorldModel::processPerfectHearInfo(), WorldModel::processUnsureHearInfo(), and WorldModel::updateDynamicObjectAfterSee().

bool SoccerTypes::isLine ObjectT    o [static]
 

This method determines whether object o is a line.

Parameters:
o  an object type
Returns:
bool indicating whether o is a line return true) or not (false)

Definition at line 1532 of file SoccerTypes.cpp.

References OBJECT_LINE_L, OBJECT_LINE_T, and ObjectT.

Referenced by WorldModel::getGlobalAngle(), WorldModel::getObjectPtrFromType(), isInSet(), and WorldModel::processNewObjectInfo().

bool SoccerTypes::isOpponent ObjectT    o [static]
 

This method determines whether object o is an opponent

Parameters:
o  an object type
Returns:
bool indicating whether o is an opponent (true) or not (false)

Definition at line 1556 of file SoccerTypes.cpp.

References OBJECT_OPPONENT_1, OBJECT_OPPONENT_UNKNOWN, and ObjectT.

Referenced by WorldModel::createInterceptFeatures(), WorldModel::getMaxRangeUnknownPlayer(), getObjectStr(), PlayerObject::isInRange(), isInSet(), WorldModel::mapUnknownPlayers(), WorldModel::predictNrCyclesToPoint(), WorldModel::processLastSeeMessage(), WorldModel::processNewObjectInfo(), WorldModel::processUnsureHearInfo(), and WorldModel::updateDynamicObjectForNextCycle().

bool SoccerTypes::isPlayer ObjectT    o [static]
 

This method determines whether object o is a player without checking whether its number or side is available.

Parameters:
o  an object type
Returns:
bool indicating whether o is a known player (true) or not (false)

Definition at line 1567 of file SoccerTypes.cpp.

References isKnownPlayer(), OBJECT_OPPONENT_UNKNOWN, OBJECT_PLAYER_UNKNOWN, OBJECT_TEAMMATE_UNKNOWN, and ObjectT.

Referenced by WorldModel::getMaxRangeUnknownPlayer(), isInSet(), WorldModel::processLastSeeMessage(), WorldModel::processNewObjectInfo(), WorldModel::processSeeGlobalInfo(), and WorldModel::show().

bool SoccerTypes::isPlayerTypeInSet PlayerT    p,
PlayerSetT    p_s
[static]
 

This method returns a boolean value which indicates whether a given player type belongs to a specific set. The set PS_DEFENDERS for example contains both the defender sweeper and the wing defenders.

Definition at line 1500 of file SoccerTypes.cpp.

References PlayerSetT, PlayerT, PS_ALL, PS_ATTACKERS, PS_DEFENDERS, PS_MIDFIELDERS, PT_ATTACKER, PT_ATTACKER_WING, PT_DEFENDER_CENTRAL, PT_DEFENDER_WING, PT_MIDFIELDER_CENTER, and PT_MIDFIELDER_WING.

Referenced by WorldModel::getClosestPlayerInFormationTo(), and WorldModel::isInPlayerSet().

bool SoccerTypes::isPrimaryCommand CommandT    com [static]
 

This method returns return true when argument is a primary action (action that can only be sent once a cycle). This is the case for kick, dash, move, turn and catch commands.

Parameters:
CommandT  command that should be checked
Returns:
true when it is a primary action, false otherwise

Definition at line 2182 of file SoccerTypes.cpp.

References CMD_CATCH, CMD_DASH, CMD_KICK, CMD_MOVE, CMD_TACKLE, CMD_TURN, and CommandT.

Referenced by ActHandler::putCommandInQueue().

bool SoccerTypes::isTeammate ObjectT    o [static]
 

This method determines whether object o is a teammate

Parameters:
o  an object type
Returns:
bool indicating whether o is a teammate (true) or not (false)

Definition at line 1548 of file SoccerTypes.cpp.

References OBJECT_TEAMMATE_1, OBJECT_TEAMMATE_UNKNOWN, and ObjectT.

Referenced by WorldModel::createInterceptFeatures(), WorldModel::getMaxRangeUnknownPlayer(), WorldModel::getObjectPtrFromType(), getObjectStr(), WorldModel::isBallInOurPossesion(), isInSet(), WorldModel::logObjectInformation(), WorldModel::mapUnknownPlayers(), WorldModel::processLastSeeMessage(), WorldModel::processUnsureHearInfo(), WorldModel::show(), and WorldModel::updateDynamicObjectForNextCycle().


The documentation for this class was generated from the following files:
Generated on Fri Nov 7 11:46:08 2003 for UvA Trilearn 2003 Base Code by doxygen1.2.12 written by Dimitri van Heesch, © 1997-2001