32#ifndef RCSC_PLAYER_COMMAND_H
33#define RCSC_PLAYER_COMMAND_H
140 std::string M_team_name;
152 const double & version = 3.0,
153 const bool goalie =
false );
177 return std::string(
"init" );
197 std::string M_team_name;
230 return std::string(
"reconnect" );
277 return std::string(
"bye" );
381 return std::string(
"move" );
419 const double & dir = 0.0 )
446 return std::string(
"dash" );
514 return std::string(
"turn" );
577 return std::string(
"kick" );
645 return std::string(
"catch" );
672 double M_power_or_dir;
681 : M_power_or_dir( power_or_dir ),
687 : M_power_or_dir( power_or_dir ),
713 return std::string(
"tackle" );
722 return M_power_or_dir;
725 bool tackleFoul()
const
826 return std::string(
"turn_neck" );
892 return std::string(
"change_view" );
929 double M_moment_dist;
941 const double moment_dir )
942 : M_moment_dist( moment_dist ),
943 M_moment_dir( moment_dir )
968 return std::string(
"change_focus" );
977 return M_moment_dist;
1005 std::string M_message;
1024 const double & version )
1034 const double & version )
1061 return std::string(
"say" );
1127 const double & rel_dir )
1155 return std::string(
"pointto" );
1259 return std::string(
"attentionto" );
1268 return M_side != NONE;
1314 const int max_version )
1315 : M_min( min_version )
1316 , M_max( max_version )
1341 return std::string(
"clang" );
1468 return std::string(
"ear" );
1546 return std::string(
"sense_body" );
1596 return std::string(
"score" );
1649 return std::string(
"compression" );
1706 return std::string(
"done" );
degree wrapper class Header File.
player's attentionto command
Definition: player_command.h:1203
std::string name() const
get command paramter
Definition: player_command.h:1257
SideType
target player's side type
Definition: player_command.h:1208
SideType side() const
get target player's side type
Definition: player_command.h:1275
Type type() const
get command type
Definition: player_command.h:1241
bool isOn() const
get on/off flag
Definition: player_command.h:1266
std::ostream & toCommandString(std::ostream &to) const
put command string to ostream
int number() const
get target player's uniform number
Definition: player_command.h:1284
PlayerAttentiontoCommand(const SideType side, const int unum)
construct on type attentionto command
Definition: player_command.h:1231
PlayerAttentiontoCommand()
construct off type attentionto command
Definition: player_command.h:1221
abstract body command
Definition: player_command.h:289
virtual Type type() const =0
get command type (pure virtual)
virtual std::ostream & toCommandString(std::ostream &to) const =0
put command string to ostream (pure virtual)
PlayerBodyCommand()
default constructor is protected because this is abstract class
Definition: player_command.h:294
virtual std::string name() const =0
get command name (pure virtual)
virtual ~PlayerBodyCommand()
virtual destructor. nothing to do.
Definition: player_command.h:302
player's disconnect command
Definition: player_command.h:246
PlayerByeCommand()
constructor. nothingto do
std::ostream & toCommandString(std::ostream &to) const
put command string to ostream
Type type() const
get command type
Definition: player_command.h:259
std::string name() const
get command name
Definition: player_command.h:275
command to specify the player's supported clang version
Definition: player_command.h:1303
int minVer() const
get clang command parameter
Definition: player_command.h:1348
Type type() const
get command type
Definition: player_command.h:1323
std::string name() const
get command paramter
Definition: player_command.h:1339
PlayerCLangCommand(const int min_version, const int max_version)
construct with version parameters
Definition: player_command.h:1313
int maxVer() const
get clang command parameter
Definition: player_command.h:1357
std::ostream & toCommandString(std::ostream &to) const
put command string to ostream
goalie's catch command
Definition: player_command.h:610
Type type() const
get command type
Definition: player_command.h:627
PlayerCatchCommand(const double &rel_dir)
construct with catch direction
Definition: player_command.h:619
double catchDir() const
get catch command parameter
Definition: player_command.h:652
std::string name() const
get command name
Definition: player_command.h:643
std::ostream & toCommandString(std::ostream &to) const
put command string to ostream
player's change focus command
Definition: player_command.h:927
double momentDist() const
get the command parameter
Definition: player_command.h:975
std::ostream & toCommandString(std::ostream &to) const
put command string to ostream
std::string name() const
get thencommand name
Definition: player_command.h:966
Type type() const
get command type
Definition: player_command.h:950
PlayerChangeFocusCommand(const double moment_dist, const double moment_dir)
construct with command parameters
Definition: player_command.h:940
double momentDir() const
get the command parameter
Definition: player_command.h:984
player's change view command
Definition: player_command.h:854
std::string name() const
get command paramter
Definition: player_command.h:890
Type type() const
get command type
Definition: player_command.h:874
const ViewWidth & width() const
get view width of this command
Definition: player_command.h:900
const ViewQuality & quality() const
get view quality of this command
Definition: player_command.h:910
std::ostream & toCommandString(std::ostream &to) const
put command string to ostream
PlayerChangeViewCommand(const ViewWidth &w, const ViewQuality &q)
construct with view mode objects
Definition: player_command.h:864
abstract player command class
Definition: player_command.h:49
Type
player client command Id
Definition: player_command.h:54
@ INIT
server connection command
Definition: player_command.h:56
@ RECONNECT
server reconnection command
Definition: player_command.h:57
@ BYE
server disconnection command
Definition: player_command.h:58
virtual Type type() const =0
get command type (pure virtual)
virtual std::ostream & toCommandString(std::ostream &to) const =0
put command string to ostream (pure virtual)
virtual std::string name() const =0
get command name (pure virtual)
virtual ~PlayerCommand()
virtual destructor, but nothing to do
Definition: player_command.h:98
PlayerCommand()
constructor is protected because this is abstract class.
Definition: player_command.h:90
command to set message compression level
Definition: player_command.h:1614
Type type() const
get command type
Definition: player_command.h:1631
int level() const
get compression command parameter
Definition: player_command.h:1656
std::ostream & toCommandString(std::ostream &to) const
put command string to ostream
std::string name() const
get command paramter
Definition: player_command.h:1647
PlayerCompressionCommand(const int level)
construct with compression level
Definition: player_command.h:1623
player's dash command
Definition: player_command.h:407
std::string name() const
get command name
Definition: player_command.h:444
double dashPower() const
get dash command parameter
Definition: player_command.h:453
double dashDir() const
get dash command parameter
Definition: player_command.h:462
std::ostream & toCommandString(std::ostream &to) const
put command string to ostream
PlayerDashCommand(const double &power, const double &dir=0.0)
construct with dash power
Definition: player_command.h:418
Type type() const
get command type
Definition: player_command.h:428
command to send done command for (think) message in synch_mode
Definition: player_command.h:1674
Type type() const
get command type
Definition: player_command.h:1688
PlayerDoneCommand()
constructor. nothing to do
Definition: player_command.h:1681
std::string name() const
get command paramter
Definition: player_command.h:1704
std::ostream & toCommandString(std::ostream &to) const
put command string to ostream
command to specify player's ear mode
Definition: player_command.h:1390
std::ostream & toCommandString(std::ostream &to) const
put command string to ostream
std::string name() const
get command paramter
Definition: player_command.h:1466
ModeType
ear mode types that specifies enabled hear message type
Definition: player_command.h:1409
PlayerEarCommand(const OnOffType onoff, const SideType side, const ModeType mode)
constcust command for specified type message
Definition: player_command.h:1438
SideType side() const
get ear command parameter
Definition: player_command.h:1485
OnOffType onOff() const
get ear command parameter
Definition: player_command.h:1476
PlayerEarCommand(const OnOffType onoff, const SideType side)
constcust command for all type message
Definition: player_command.h:1425
Type type() const
get command type
Definition: player_command.h:1450
ModeType mode() const
get ear command parameter
Definition: player_command.h:1494
OnOffType
on/off types
Definition: player_command.h:1395
SideType
side types
Definition: player_command.h:1402
player's init command
Definition: player_command.h:138
PlayerInitCommand(const std::string &team_name, const double &version=3.0, const bool goalie=false)
construct with init parameters
std::ostream & toCommandString(std::ostream &to) const
put command string to ostream
std::string name() const
get command name
Definition: player_command.h:175
Type type() const
get command type
Definition: player_command.h:159
kick command
Definition: player_command.h:539
Type type() const
get command type
Definition: player_command.h:559
std::string name() const
get command name
Definition: player_command.h:575
std::ostream & toCommandString(std::ostream &to) const
put command string to ostream
double kickPower() const
get kick command parameter
Definition: player_command.h:584
PlayerKickCommand(const double &power, const double &dir)
construct with kick parameters
Definition: player_command.h:549
double kickDir() const
get kick command parameter
Definition: player_command.h:593
player's move command
Definition: player_command.h:343
std::ostream & toCommandString(std::ostream &to) const
put command string to ostream
Vector2D movePos() const
get move command parameter
Definition: player_command.h:388
Type type() const
get command type
Definition: player_command.h:363
PlayerMoveCommand(const double &x, const double &y)
construct with move target point
Definition: player_command.h:353
std::string name() const
get command name
Definition: player_command.h:379
player's turn neck command
Definition: player_command.h:1106
std::string name() const
get command paramter
Definition: player_command.h:1153
const double & pointtoDist() const
get pointto command parameter
Definition: player_command.h:1173
PlayerPointtoCommand()
target angle relative to body angle
Definition: player_command.h:1115
PlayerPointtoCommand(const double &dist, const double &rel_dir)
construct on type pointto command with point target
Definition: player_command.h:1126
Type type() const
get command type
Definition: player_command.h:1137
bool pointtoOn() const
get pointto command switch
Definition: player_command.h:1163
std::ostream & toCommandString(std::ostream &to) const
put command string to ostream
const double & pointtoDir() const
get pointto command parameter
Definition: player_command.h:1183
reconnect command
Definition: player_command.h:195
PlayerReconnectCommand(const std::string &team_name, const int unum)
construct with reconnect parameters
std::ostream & toCommandString(std::ostream &to) const
put command string to ostream
std::string name() const
get command name
Definition: player_command.h:228
Type type() const
get command type
Definition: player_command.h:212
player's say command
Definition: player_command.h:1003
const std::string & message() const
get command parameter
Definition: player_command.h:1087
void append(const std::string &msg)
append new string
Definition: player_command.h:1077
PlayerSayCommand(const double &version)
construct with client version, no message
Definition: player_command.h:1014
PlayerSayCommand(const char *msg, const double &version)
construct with cstring say message
Definition: player_command.h:1023
std::ostream & toCommandString(std::ostream &to) const
put command string to ostream
void assign(const std::string &msg)
assign new message
Definition: player_command.h:1068
PlayerSayCommand(const std::string &msg, const double &version)
construct with say message string
Definition: player_command.h:1033
Type type() const
get command type
Definition: player_command.h:1043
std::string name() const
get command paramter
Definition: player_command.h:1059
command to require current game score
Definition: player_command.h:1564
Type type() const
get command type
Definition: player_command.h:1578
std::string name() const
get command paramter
Definition: player_command.h:1594
PlayerScoreCommand()
constructor. nothing to do
Definition: player_command.h:1571
std::ostream & toCommandString(std::ostream &to) const
put command string to ostream
command to require sense_body
Definition: player_command.h:1514
PlayerSenseBodyCommand()
constructor. nothing to do
Definition: player_command.h:1521
std::ostream & toCommandString(std::ostream &to) const
put command string to ostream
std::string name() const
get command paramter
Definition: player_command.h:1544
Type type() const
get command type
Definition: player_command.h:1528
abstract support command
Definition: player_command.h:739
PlayerSupportCommand()
constructor is protected because this is abstract class.
Definition: player_command.h:744
virtual std::ostream & toCommandString(std::ostream &to) const =0
put command string to ostream (pure virtual)
virtual std::string name() const =0
get command name (pure virtual)
virtual ~PlayerSupportCommand()
virtual destructor, but nothing to do
Definition: player_command.h:752
virtual Type type() const =0
get command type (pure virtual)
player's tackle command
Definition: player_command.h:670
PlayerTackleCommand(const double &power_or_dir)
construct with tackle power
Definition: player_command.h:680
Type type() const
get command type
Definition: player_command.h:695
std::string name() const
get command name
Definition: player_command.h:711
double tacklePowerOrDir() const
get tackle command parameter
Definition: player_command.h:720
std::ostream & toCommandString(std::ostream &to) const
put command string to ostream
turn command
Definition: player_command.h:479
std::ostream & toCommandString(std::ostream &to) const
put command string to ostream
PlayerTurnCommand(const double &moment)
construct with turn moment
Definition: player_command.h:488
double turnMoment() const
get turn command parameter
Definition: player_command.h:521
std::string name() const
get command name
Definition: player_command.h:512
Type type() const
get command type
Definition: player_command.h:496
player's turn neck command
Definition: player_command.h:791
const double & moment() const
get command paramter
Definition: player_command.h:834
Type type() const
get command type
Definition: player_command.h:808
PlayerTurnNeckCommand(const double &moment)
construct with moment to turn neck
Definition: player_command.h:800
std::ostream & toCommandString(std::ostream &to) const
put command string to ostream
std::string name() const
get command name
Definition: player_command.h:824
2D point vector class
Definition: vector_2d.h:46
view quality data class
Definition: view_mode.h:216
view width data class
Definition: view_mode.h:43
2d vector class Header File.
const char * version()
get the package version number string.
player view mode data classes Header File