Home | Docs | Authors | Clients | Library Repository | RoboCup | Admin |
rccparser.hGo to the documentation of this file.00001 // -*-c++-*- 00002 00003 /*************************************************************************** 00004 rccparser.h 00005 Parser Abstract Base Class 00006 ------------------- 00007 begin : 24-MAY-2002 00008 copyright : (C) 2002 by Tom Howard 00009 email : tomhoward@users.sf.net 00010 ***************************************************************************/ 00011 00012 /*************************************************************************** 00013 * * 00014 * This program is free software; you can redistribute it and/or modify * 00015 * it under the terms of the GNU GPL as published by the Free Software * 00016 * Foundation; either version 2 of the License, or (at your option) any * 00017 * later version. * 00018 * * 00019 ***************************************************************************/ 00020 00342 #ifndef RCCPARSER_H 00343 #define RCCPARSER_H 00344 00345 #include <rcssbase/parser.h> 00346 //#include "rcclexer.h" 00347 00356 int RCC_parse( void * ); 00357 00358 00359 class RCCLexer; 00360 00362 namespace rcc 00363 { 00364 class Lexer; 00365 00366 class Holder 00367 { 00368 private: 00369 enum Type { S_CSTR, S_INT, S_DOUB, S_BOOL, S_STR }; 00370 00371 union 00372 { 00373 const char* m_cstr; 00374 int m_int; 00375 double m_double; 00376 bool m_bool; 00377 }; 00378 std::string m_str; 00379 Type m_type; 00380 00381 public: 00382 Holder& 00383 operator=( const char* x ) 00384 { 00385 m_cstr = x; 00386 m_type = S_CSTR; 00387 return *this; 00388 } 00389 00390 Holder& 00391 operator=( int x ) 00392 { 00393 m_int = x; 00394 m_type = S_INT; 00395 return *this; 00396 } 00397 00398 Holder& 00399 operator=( double x ) 00400 { 00401 m_double = x; 00402 m_type = S_DOUB; 00403 return *this; 00404 } 00405 00406 Holder& 00407 operator=( bool x ) 00408 { 00409 m_bool = x; 00410 m_type = S_BOOL; 00411 return *this; 00412 } 00413 00414 Holder& 00415 operator=( const std::string& x ) 00416 { 00417 m_str = x; 00418 m_type = S_STR; 00419 return *this; 00420 } 00421 00422 const char* 00423 getCStr() const 00424 { return m_cstr; } 00425 00426 int 00427 getInt() const 00428 { return m_int; } 00429 00430 double 00431 getDouble() const 00432 { return m_double; } 00433 00434 bool 00435 getBool() const 00436 { return m_bool; } 00437 00438 std::string& 00439 getStr() 00440 { return m_str; } 00441 00442 const std::string& 00443 getStr() const 00444 { return m_str; } 00445 }; 00446 00454 class Parser 00455 : public rcss::Parser 00456 { 00457 public: 00458 typedef rcc::Lexer Lexer; 00459 00460 private: 00461 class Param 00462 { 00463 private: 00464 Lexer* M_lexer; 00465 Parser& M_parser; 00466 00467 public: 00468 Param( Parser& parser ); 00469 00470 ~Param(); 00471 00472 Param( const Param& ); 00473 00474 Param& 00475 operator=( const Param& ); 00476 00477 Parser& 00478 getParser() 00479 { return M_parser; } 00480 00481 Lexer& 00482 getLexer() 00483 { return *M_lexer; } 00484 00485 bool 00486 parseCLang( const char* message ) 00487 { return M_parser.parseCLang( message ); } 00488 00489 void 00490 msgParsed() 00491 { M_parser.doMsgParsed(); } 00492 00493 void 00494 buildFullState( int time ) 00495 { M_parser.doBuildFullState( time ); } 00496 00497 void 00498 buildCounts( int kick, 00499 int dash, 00500 int turn, 00501 int katch, 00502 int move, 00503 int turn_neck, 00504 int change_view, 00505 int say ) 00506 { 00507 M_parser.doBuildCounts( kick, dash, turn, katch, move, 00508 turn_neck, change_view, say ); 00509 } 00510 00511 void 00512 buildCatchBallLeftPlayMode() 00513 { M_parser.doBuildCatchBallLeftPlayMode(); } 00514 00515 void 00516 buildCatchBallRightPlayMode() 00517 { M_parser.doBuildCatchBallRightPlayMode(); } 00518 00519 void 00520 buildBeforeKickOffPlayMode() 00521 { M_parser.doBuildBeforeKickOffPlayMode(); } 00522 00523 void 00524 buildTimeOverPlayMode() 00525 { M_parser.doBuildTimeOverPlayMode(); } 00526 00527 void 00528 buildPlayOnPlayMode() 00529 { M_parser.doBuildPlayOnPlayMode(); } 00530 00531 void 00532 buildKickOffLeftPlayMode() 00533 { M_parser.doBuildKickOffLeftPlayMode(); } 00534 00535 void 00536 buildKickOffRightPlayMode() 00537 { M_parser.doBuildKickOffRightPlayMode(); } 00538 00539 void 00540 buildKickInLeftPlayMode() 00541 { M_parser.doBuildKickInLeftPlayMode(); } 00542 00543 void 00544 buildKickInRightPlayMode() 00545 { M_parser.doBuildKickInRightPlayMode(); } 00546 00547 void 00548 buildFreeKickLeftPlayMode() 00549 { M_parser.doBuildFreeKickLeftPlayMode(); } 00550 00551 void 00552 buildFreeKickRightPlayMode() 00553 { M_parser.doBuildFreeKickRightPlayMode(); } 00554 00555 void 00556 buildCornerKickLeftPlayMode() 00557 { M_parser.doBuildCornerKickLeftPlayMode(); } 00558 00559 void 00560 buildCornerKickRightPlayMode() 00561 { M_parser.doBuildCornerKickRightPlayMode(); } 00562 00563 void 00564 buildGoalKickLeftPlayMode() 00565 { M_parser.doBuildGoalKickLeftPlayMode(); } 00566 00567 void 00568 buildGoalKickRightPlayMode() 00569 { M_parser.doBuildGoalKickRightPlayMode(); } 00570 00571 void 00572 buildAfterGoalLeftPlayMode() 00573 { M_parser.doBuildAfterGoalLeftPlayMode(); } 00574 00575 void 00576 buildAfterGoalRightPlayMode() 00577 { M_parser.doBuildAfterGoalRightPlayMode(); } 00578 00579 void 00580 buildDropBallPlayMode() 00581 { M_parser.doBuildDropBallPlayMode(); } 00582 00583 void 00584 buildOffSideLeftPlayMode() 00585 { M_parser.doBuildOffSideLeftPlayMode(); } 00586 00587 void 00588 buildOffsideRightPlayMode() 00589 { M_parser.doBuildOffsideRightPlayMode(); } 00590 00591 void 00592 buildPenaltyKickLeftPlayMode() 00593 { M_parser.doBuildPenaltyKickLeftPlayMode(); } 00594 00595 void 00596 buildPenaltyKickRightPlayMode() 00597 { M_parser.doBuildPenaltyKickRightPlayMode(); } 00598 00599 void 00600 buildFirstHalfOverPlayMode() 00601 { M_parser.doBuildFirstHalfOverPlayMode(); } 00602 00603 void 00604 buildPausePlayMode() 00605 { M_parser.doBuildPausePlayMode(); } 00606 00607 void 00608 buildHumanPlayMode() 00609 { M_parser.doBuildHumanPlayMode(); } 00610 00611 void 00612 buildFoulLeftPlayMode() 00613 { M_parser.doBuildFoulLeftPlayMode(); } 00614 00615 void 00616 buildFoulRightPlayMode() 00617 { M_parser.doBuildFoulRightPlayMode(); } 00618 00619 void 00620 buildFoulChargeLeftPlayMode() 00621 { M_parser.doBuildFoulChargeLeftPlayMode(); } 00622 00623 void 00624 buildFoulChargeRightPlayMode() 00625 { M_parser.doBuildFoulChargeRightPlayMode(); } 00626 00627 void 00628 buildFoulPushLeftPlayMode() 00629 { M_parser.doBuildFoulPushLeftPlayMode(); } 00630 00631 void 00632 buildFoulPushRightPlayMode() 00633 { M_parser.doBuildFoulPushRightPlayMode(); } 00634 00635 void 00636 buildFoulMultipleAttackerLeftPlayMode() 00637 { M_parser.doBuildFoulMultipleAttackerLeftPlayMode(); } 00638 00639 void 00640 buildFoulMultipleAttackerRightPlayMode() 00641 { M_parser.doBuildFoulMultipleAttackerRightPlayMode(); } 00642 00643 void 00644 buildFoulBallOutLeftPlayMode() 00645 { M_parser.doBuildFoulBallOutLeftPlayMode(); } 00646 00647 void 00648 buildFoulBallOutRightPlayMode() 00649 { M_parser.doBuildFoulBallOutRightPlayMode(); } 00650 00651 void 00652 buildBackPassLeftPlayMode() 00653 { M_parser.doBuildBackPassLeftPlayMode(); } 00654 00655 void 00656 buildBackPassRightPlayMode() 00657 { M_parser.doBuildBackPassRightPlayMode(); } 00658 00659 void 00660 buildFreeKickFaultLeftPlayMode() 00661 { M_parser.doBuildFreeKickFaultLeftPlayMode(); } 00662 00663 void 00664 buildFreeKickFaultRightPlayMode() 00665 { M_parser.doBuildFreeKickFaultRightPlayMode(); } 00666 00667 void 00668 buildCatchFaultLeftPlayMode() 00669 { M_parser.doBuildCatchFaultLeftPlayMode(); } 00670 00671 void 00672 buildCatchFaultRightPlayMode() 00673 { M_parser.doBuildCatchFaultRightPlayMode(); } 00674 00675 void 00676 buildIndirectFreeKickLeftPlayMode() 00677 { M_parser.doBuildIndirectFreeKickLeftPlayMode(); } 00678 00679 void 00680 buildIndirectFreeKickRightPlayMode() 00681 { M_parser.doBuildIndirectFreeKickRightPlayMode(); } 00682 00683 void 00684 buildPenaltySetupLeftPlaymode() 00685 { M_parser.doBuildPenaltySetupLeftPlaymode(); } 00686 00687 void 00688 buildPenaltySetupRightPlaymode() 00689 { M_parser.doBuildPenaltySetupRightPlaymode(); } 00690 00691 void 00692 buildPenaltyReadyLeftPlaymode() 00693 { M_parser.doBuildPenaltyReadyLeftPlaymode(); } 00694 00695 void 00696 buildPenaltyReadyRightPlaymode() 00697 { M_parser.doBuildPenaltyReadyRightPlaymode(); } 00698 00699 void 00700 buildPenaltyTakenLeftPlaymode() 00701 { M_parser.doBuildPenaltyTakenLeftPlaymode(); } 00702 00703 void 00704 buildPenaltyTakenRightPlaymode() 00705 { M_parser.doBuildPenaltyTakenRightPlaymode(); } 00706 00707 void 00708 buildPenaltyMissLeftPlaymode() 00709 { M_parser.doBuildPenaltyMissLeftPlaymode(); } 00710 00711 void 00712 buildPenaltyMissRightPlaymode() 00713 { M_parser.doBuildPenaltyMissRightPlaymode(); } 00714 00715 void 00716 buildPenaltyScoreLeftPlaymode() 00717 { M_parser.doBuildPenaltyScoreLeftPlaymode(); } 00718 00719 void 00720 buildPenaltyScoreRightPlaymode() 00721 { M_parser.doBuildPenaltyScoreRightPlaymode(); } 00722 00723 void 00724 buildPenaltyOnFieldLeftPlaymode() 00725 { M_parser.doBuildPenaltyOnFieldLeftPlaymode(); } 00726 00727 void 00728 buildPenaltyOnFieldRightPlaymode() 00729 { M_parser.doBuildPenaltyOnFieldRightPlaymode(); } 00730 00731 void 00732 buildPenaltyFoulLeftPlaymode() 00733 { M_parser.doBuildPenaltyFoulLeftPlaymode(); } 00734 00735 void 00736 buildPenaltyFoulRightPlaymode() 00737 { M_parser.doBuildPenaltyFoulRightPlaymode(); } 00738 00739 void 00740 buildPenaltyWinnerLeftPlaymode() 00741 { M_parser.doBuildPenaltyWinnerLeftPlaymode(); } 00742 00743 void 00744 buildPenaltyWinnerRightPlaymode() 00745 { M_parser.doBuildPenaltyWinnerRightPlaymode(); } 00746 00747 void 00748 buildPenaltyDrawPlaymode() 00749 { M_parser.doBuildPenaltyDrawPlaymode(); } 00750 00751 00752 void 00753 buildScore( int our, int opp ) 00754 { M_parser.doBuildScore( our, opp ); } 00755 00756 void 00757 buildBall( double x, double y, 00758 double delta_x, double delta_y ) 00759 { M_parser.doBuildBall( x, y, delta_x, delta_y ); } 00760 00761 void 00762 buildPlayer( int unum, 00763 double x, double y, 00764 double delta_x, double delta_y, 00765 double orientation, double head_orientation, 00766 int stamina, double effort, double recovery ) 00767 { 00768 M_parser.doBuildPlayer( unum, 00769 x, y, 00770 delta_x, delta_y, 00771 orientation, head_orientation, 00772 stamina, effort, recovery ); 00773 } 00774 00775 void 00776 buildPlayer( int unum, int type, 00777 double pos_x, double pos_y, 00778 double vel_x, double vel_y, 00779 double body_dir, double head_dir, 00780 double stamina, double effort, 00781 double recovery ) 00782 { 00783 M_parser.doBuildPlayer( unum, type, pos_x, pos_y, vel_x, vel_y, 00784 body_dir, head_dir, stamina, effort, recovery ); 00785 } 00786 00787 void 00788 buildPlayer( int unum, int type, 00789 double pos_x, double pos_y, 00790 double vel_x, double vel_y, 00791 double body_dir, double head_dir, 00792 double arm_mag, double arm_dir, 00793 double stamina, double effort, 00794 double recovery ) 00795 { 00796 M_parser.doBuildPlayer( unum, type, pos_x, pos_y, vel_x, vel_y, 00797 body_dir, head_dir, arm_mag, arm_dir, 00798 stamina, effort, recovery ); 00799 } 00800 00801 void 00802 buildGoalie( int unum, 00803 double pos_x, double pos_y, 00804 double vel_x, double vel_y, 00805 double body_dir, double head_dir, 00806 double stamina, double effort, 00807 double recovery ) 00808 { 00809 M_parser.doBuildGoalie( unum, pos_x, pos_y, vel_x, vel_y, 00810 body_dir, head_dir, stamina, effort, recovery ); 00811 } 00812 00813 void 00814 buildGoalie( int unum, 00815 double pos_x, double pos_y, 00816 double vel_x, double vel_y, 00817 double body_dir, double head_dir, 00818 double arm_mag, double arm_dir, 00819 double stamina, double effort, 00820 double recovery ) 00821 { 00822 M_parser.doBuildGoalie( unum, pos_x, pos_y, vel_x, vel_y, 00823 body_dir, head_dir, arm_mag, arm_dir, 00824 stamina, effort, recovery ); 00825 } 00826 00827 void 00828 buildLeftSide() 00829 { M_parser.doBuildLeftSide(); } 00830 00831 void 00832 buildRightSide() 00833 { M_parser.doBuildRightSide(); } 00834 00835 void 00836 buildOurSide() 00837 { M_parser.doBuildOurSide(); } 00838 00839 void 00840 buildOppSide() 00841 { M_parser.doBuildOppSide(); } 00842 00843 00844 void 00845 buildNeutralSide() 00846 { M_parser.doBuildNeutralSide(); } 00847 00848 00849 void 00850 buildSenseBody( int time, 00851 double stamina, 00852 double effort, 00853 double speed_mag, 00854 double speed_head, 00855 double head_angle, 00856 int kick_count, 00857 int dash_count, 00858 int turn_count, 00859 int say_count, 00860 int turn_neck_count, 00861 int catch_count, 00862 int move_count, 00863 int chg_view_count ) 00864 { 00865 M_parser.doBuildSenseBody( time, stamina, effort, speed_mag, speed_head, 00866 head_angle, kick_count, dash_count, turn_count, 00867 say_count, turn_neck_count, catch_count, move_count, 00868 chg_view_count ); 00869 } 00870 00871 void 00872 buildArmState( int movable_in, 00873 int expires_in, 00874 double target_x, 00875 double target_y, 00876 int count ) 00877 { M_parser.doBuildArmState( movable_in, expires_in, target_x, target_y, count ); } 00878 00879 void 00880 buildFocusState( int count ) 00881 { M_parser.doBuildFocusState( count ); } 00882 00883 void 00884 buildFocusState( int unum, int count ) 00885 { M_parser.doBuildFocusState( unum, count ); } 00886 00887 00888 void 00889 buildTackleState( int expires_in, int count ) 00890 { M_parser.doBuildTackleState( expires_in, count ); } 00891 00892 void 00893 buildViewMode() 00894 { M_parser.doBuildViewMode(); } 00895 00896 void 00897 buildViewQualityHigh() 00898 { M_parser.doBuildViewQualityHigh(); } 00899 00900 void 00901 buildViewQualityLow() 00902 { M_parser.doBuildViewQualityLow(); } 00903 00904 void 00905 buildViewWidthNarrow() 00906 { M_parser.doBuildViewWidthNarrow(); } 00907 00908 void 00909 buildViewWidthNormal() 00910 { M_parser.doBuildViewWidthNormal(); } 00911 00912 void 00913 buildViewWidthWide() 00914 { M_parser.doBuildViewWidthWide(); } 00915 00916 void 00917 buildServerParam ( double gwidth, 00918 double inertia_moment, 00919 double psize, 00920 double pdecay, 00921 double prand, 00922 double pweight, 00923 double pspeed_max, 00924 double paccel_max, 00925 double stamina_max, 00926 double stamina_inc, 00927 double recover_init, 00928 double recover_dthr, 00929 double recover_min, 00930 double recover_dec, 00931 double effort_init, 00932 double effort_dthr, 00933 double effort_min, 00934 double effort_dec, 00935 double effort_ithr, 00936 double effort_inc, 00937 double kick_rand, 00938 int team_actuator_noise, 00939 double prand_factor_l, 00940 double prand_factor_r, 00941 double kick_rand_factor_l, 00942 double kick_rand_factor_r, 00943 double bsize, 00944 double bdecay, 00945 double brand, 00946 double bweight, 00947 double bspeed_max, 00948 double baccel_max, 00949 double dprate, 00950 double kprate, 00951 double kmargin, 00952 double ctlradius, 00953 double ctlradius_width, 00954 double maxp, 00955 double minp, 00956 double maxm, 00957 double minm, 00958 double maxnm, 00959 double minnm, 00960 double maxn, 00961 double minn, 00962 double visangle, 00963 double visdist, 00964 double windir, 00965 double winforce, 00966 double winang, 00967 double winrand, 00968 double kickable_area, 00969 double catch_area_l, 00970 double catch_area_w, 00971 double catch_prob, 00972 int goalie_max_moves, 00973 double ckmargin, 00974 double offside_area, 00975 int win_no, 00976 int win_random, 00977 int say_cnt_max, 00978 int SayCoachMsgSize, 00979 int clang_win_size, 00980 int clang_define_win, 00981 int clang_meta_win, 00982 int clang_advice_win, 00983 int clang_info_win, 00984 int clang_mess_delay, 00985 int clang_mess_per_cycle, 00986 int half_time, 00987 int sim_st, 00988 int send_st, 00989 int recv_st, 00990 int sb_step, 00991 int lcm_st, 00992 int SayMsgSize, 00993 int hear_max, 00994 int hear_inc, 00995 int hear_decay, 00996 int cban_cycle, 00997 int slow_down_factor, 00998 int useoffside, 00999 int kickoffoffside, 01000 double offside_kick_margin, 01001 double audio_dist, 01002 double dist_qstep, 01003 double land_qstep, 01004 double dir_qstep, 01005 double dist_qstep_l, 01006 double dist_qstep_r, 01007 double land_qstep_l, 01008 double land_qstep_r, 01009 double dir_qstep_l, 01010 double dir_qstep_r, 01011 int CoachMode, 01012 int CwRMode, 01013 int old_hear, 01014 int sv_st, 01015 int start_goal_l, 01016 int start_goal_r, 01017 int fullstate_l, 01018 int fullstate_r, 01019 int drop_time ) 01020 { 01021 M_parser.doBuildServerParam( gwidth, 01022 inertia_moment, 01023 psize, 01024 pdecay, 01025 prand, 01026 pweight, 01027 pspeed_max, 01028 paccel_max, 01029 stamina_max, 01030 stamina_inc, 01031 recover_init, 01032 recover_dthr, 01033 recover_min, 01034 recover_dec, 01035 effort_init, 01036 effort_dthr, 01037 effort_min, 01038 effort_dec, 01039 effort_ithr, 01040 effort_inc, 01041 kick_rand, 01042 team_actuator_noise, 01043 prand_factor_l, 01044 prand_factor_r, 01045 kick_rand_factor_l, 01046 kick_rand_factor_r, 01047 bsize, 01048 bdecay, 01049 brand, 01050 bweight, 01051 bspeed_max, 01052 baccel_max, 01053 dprate, 01054 kprate, 01055 kmargin, 01056 ctlradius, 01057 ctlradius_width, 01058 maxp, 01059 minp, 01060 maxm, 01061 minm, 01062 maxnm, 01063 minnm, 01064 maxn, 01065 minn, 01066 visangle, 01067 visdist, 01068 windir, 01069 winforce, 01070 winang, 01071 winrand, 01072 kickable_area, 01073 catch_area_l, 01074 catch_area_w, 01075 catch_prob, 01076 goalie_max_moves, 01077 ckmargin, 01078 offside_area, 01079 win_no, 01080 win_random, 01081 say_cnt_max, 01082 SayCoachMsgSize, 01083 clang_win_size, 01084 clang_define_win, 01085 clang_meta_win, 01086 clang_advice_win, 01087 clang_info_win, 01088 clang_mess_delay, 01089 clang_mess_per_cycle, 01090 half_time, 01091 sim_st, 01092 send_st, 01093 recv_st, 01094 sb_step, 01095 lcm_st, 01096 SayMsgSize, 01097 hear_max, 01098 hear_inc, 01099 hear_decay, 01100 cban_cycle, 01101 slow_down_factor, 01102 useoffside, 01103 kickoffoffside, 01104 offside_kick_margin, 01105 audio_dist, 01106 dist_qstep, 01107 land_qstep, 01108 dir_qstep, 01109 dist_qstep_l, 01110 dist_qstep_r, 01111 land_qstep_l, 01112 land_qstep_r, 01113 dir_qstep_l, 01114 dir_qstep_r, 01115 CoachMode, 01116 CwRMode, 01117 old_hear, 01118 sv_st, 01119 start_goal_l, 01120 start_goal_r, 01121 fullstate_l, 01122 fullstate_r, 01123 drop_time ); 01124 } 01125 01126 void 01127 buildServerParam() 01128 { M_parser.doBuildServerParam(); } 01129 01130 void 01131 buildParam( const std::string& name, 01132 int value ) 01133 { M_parser.doBuildParam( name, value ); } 01134 01135 void 01136 buildParam( const std::string& name, 01137 double value ) 01138 { M_parser.doBuildParam( name, value ); } 01139 01140 void 01141 buildParam( const std::string& name, 01142 const std::string& value ) 01143 { M_parser.doBuildParam( name, value ); } 01144 01145 void 01146 buildPlayerParam( int player_types, 01147 int subs_max, 01148 int pt_max, 01149 double player_speed_max_delta_min, 01150 double player_speed_max_delta_max, 01151 double stamina_inc_max_delta_factor, 01152 double player_decay_delta_min, 01153 double player_decay_delta_max, 01154 double inertia_moment_delta_factor, 01155 double dash_power_rate_delta_min, 01156 double dash_power_rate_delta_max, 01157 double player_size_delta_factor, 01158 double kickable_margin_delta_min, 01159 double kickable_margin_delta_max, 01160 double kick_rand_delta_factor, 01161 double extra_stamina_delta_min, 01162 double extra_stamina_delta_max, 01163 double effort_max_delta_factor, 01164 double effort_min_delta_factor ) 01165 { 01166 M_parser.doBuildPlayerParam( player_types, 01167 subs_max, 01168 pt_max, 01169 player_speed_max_delta_min, 01170 player_speed_max_delta_max, 01171 stamina_inc_max_delta_factor, 01172 player_decay_delta_min, 01173 player_decay_delta_max, 01174 inertia_moment_delta_factor, 01175 dash_power_rate_delta_min, 01176 dash_power_rate_delta_max, 01177 player_size_delta_factor, 01178 kickable_margin_delta_min, 01179 kickable_margin_delta_max, 01180 kick_rand_delta_factor, 01181 extra_stamina_delta_min, 01182 extra_stamina_delta_max, 01183 effort_max_delta_factor, 01184 effort_min_delta_factor ); 01185 } 01186 01187 void 01188 buildPlayerParam() 01189 { M_parser.doBuildPlayerParam(); } 01190 01191 void 01192 buildPlayerType ( int id, 01193 double player_speed_max, 01194 double stamina_inc_max, 01195 double player_decay, 01196 double inertia_moment, 01197 double dash_power_rate, 01198 double player_size, 01199 double kickable_margin, 01200 double kick_rand, 01201 double extra_stamina, 01202 double effort_max, 01203 double effort_min ) 01204 { 01205 M_parser.doBuildPlayerType ( id, 01206 player_speed_max, 01207 stamina_inc_max, 01208 player_decay, 01209 inertia_moment, 01210 dash_power_rate, 01211 player_size, 01212 kickable_margin, 01213 kick_rand, 01214 extra_stamina, 01215 effort_max, 01216 effort_min ); 01217 } 01218 01219 void 01220 buildPlayerType() 01221 { M_parser.doBuildPlayerType(); } 01222 01223 void 01224 buildVisual( int time ) 01225 { M_parser.doBuildVisual( time ); } 01226 01227 void 01228 buildGlobalVisual( int time ) 01229 { M_parser.doBuildGlobalVisual( time ); } 01230 01231 void 01232 buildLine( double dist, double dir ) 01233 { M_parser.doBuildLine( dist, dir ); } 01234 01235 void 01236 buildLine( double dir ) 01237 { M_parser.doBuildLine( dir ); } 01238 01239 void 01240 buildTopLocation() 01241 { M_parser.doBuildTopLocation(); } 01242 01243 void 01244 buildBottomLocation() 01245 { M_parser.doBuildBottomLocation(); } 01246 01247 void 01248 buildLeftLocation() 01249 { M_parser.doBuildLeftLocation(); } 01250 01251 void 01252 buildRightLocation() 01253 { M_parser.doBuildRightLocation(); } 01254 01255 void 01256 buildCenterLocation() 01257 { M_parser.doBuildCenterLocation(); } 01258 01259 void 01260 buildPenaltyLocation() 01261 { M_parser.doBuildPenaltyLocation(); } 01262 01263 void 01264 buildGoalLocation() 01265 { M_parser.doBuildGoalLocation(); } 01266 01267 void 01268 buildFlagOffset( int offset ) 01269 { M_parser.doBuildFlagOffset( offset ); } 01270 01271 void 01272 buildFlag( double dist, double dir, 01273 double dist_chg, double dir_chg ) 01274 { M_parser.doBuildFlag( dist, dir, dist_chg, dir_chg ); } 01275 01276 void 01277 buildFlag( bool close, double dist, double dir ) 01278 { M_parser.doBuildFlag( close, dist, dir ); } 01279 01280 void 01281 buildFlag( bool close, double dir ) 01282 { M_parser.doBuildFlag( close, dir ); } 01283 01284 void 01285 buildGoal( double dist, double dir, 01286 double dist_chg, double dir_chg ) 01287 { M_parser.doBuildGoal( dist, dir, dist_chg, dir_chg ); } 01288 01289 void 01290 buildGoal( bool close, double dist, double dir ) 01291 { M_parser.doBuildGoal( close, dist, dir ); } 01292 01293 void 01294 buildGoal( bool close, double dir ) 01295 { M_parser.doBuildGoal( close, dir ); } 01296 01297 void 01298 buildGlobalGoal( double x, double y ) 01299 { M_parser.doBuildGlobalGoal( x, y ); } 01300 01301 void 01302 buildPlayerVisBall( double dist, double dir, 01303 double dist_chg, double dir_chg ) 01304 { M_parser.doBuildPlayerVisBall( dist, dir, dist_chg, dir_chg ); } 01305 01306 void 01307 buildBall( bool close, double dist, double dir ) 01308 { M_parser.doBuildBall( close, dist, dir ); } 01309 01310 void 01311 buildBall( bool close, double dir ) 01312 { M_parser.doBuildBall( close, dir ); } 01313 01314 void 01315 buildGlobalBall( double x, double y, 01316 double delta_x, double delta_y ) 01317 { M_parser.doBuildGlobalBall( x, y, delta_x, delta_y ); } 01318 01319 void 01320 buildPlayer( double dist, double dir, 01321 double dist_chg, double dir_chg, 01322 double orientation, double head_orientation, 01323 double point_dir, bool tackling ) 01324 { 01325 M_parser.doBuildPlayer( dist, dir, dist_chg, dir_chg, 01326 orientation, head_orientation, point_dir, tackling ); 01327 } 01328 01329 void 01330 buildPlayer( double dist, double dir, 01331 double dist_chg, double dir_chg, 01332 double point_dir, bool tackling ) 01333 { 01334 M_parser.doBuildPlayer( dist, dir, dist_chg, dir_chg, 01335 point_dir, tackling ); 01336 } 01337 01338 void 01339 buildPlayer( double dist, double dir , 01340 double point_dir, bool tackling ) 01341 { M_parser.doBuildPlayer( dist, dir, point_dir, tackling ); } 01342 01343 void 01344 buildPlayer( double dist, double dir, 01345 double dist_chg, double dir_chg, 01346 double orientation, double head_orientation, 01347 bool tackling ) 01348 { 01349 M_parser.doBuildPlayer( dist, dir, dist_chg, dir_chg, 01350 orientation, head_orientation, tackling ); 01351 } 01352 01353 void 01354 buildPlayer( double dist, double dir, 01355 double dist_chg, double dir_chg, 01356 bool tackling ) 01357 { M_parser.doBuildPlayer( dist, dir, dist_chg, dir_chg, tackling ); } 01358 01359 void 01360 buildPlayer( bool close, double dist, double dir , 01361 bool tackling ) 01362 { M_parser.doBuildPlayer( close, dist, dir, tackling ); } 01363 01364 void 01365 buildPlayer( bool close, double dir ) 01366 { M_parser.doBuildPlayer( close, dir ); } 01367 01368 void 01369 buildGlobalPlayer( double x, double y, 01370 double delta_x, double delta_y, 01371 double orientation, double head_orientation, 01372 bool tackling ) 01373 { 01374 M_parser.doBuildGlobalPlayer( x, y, delta_x, delta_y, 01375 orientation, head_orientation, 01376 tackling ); 01377 } 01378 01379 void 01380 buildGlobalPlayer( double x, double y, 01381 double delta_x, double delta_y, 01382 double orientation, double head_orientation, 01383 double point_dir, bool tackling ) 01384 { 01385 M_parser.doBuildGlobalPlayer( x, y, delta_x, delta_y, 01386 orientation, head_orientation, 01387 point_dir, tackling ); 01388 } 01389 01390 void 01391 buildTeamName( const std::string& name ) 01392 { M_parser.doBuildTeamName( name ); } 01393 01394 void 01395 buildUNum( int unum ) 01396 { M_parser.doBuildUNum( unum ); } 01397 01398 void 01399 buildGoalie() 01400 { M_parser.doBuildGoalie(); } 01401 01402 void 01403 buildScore( int time, int our, int opp ) 01404 { M_parser.doBuildScore( time, our, opp ); } 01405 01406 void 01407 buildInit( int unum ) 01408 { M_parser.doBuildInit( unum ); } 01409 01410 void 01411 buildInit() 01412 { M_parser.doBuildInit(); } 01413 01414 void 01415 buildCoachInit() 01416 { M_parser.doBuildCoachInit(); } 01417 01418 void 01419 buildCoachAudio( int time, const std::string& msg ) 01420 { M_parser.doBuildCoachAudio( time, msg ); } 01421 01422 void 01423 buildRefAudio( int time ) 01424 { M_parser.doBuildRefAudio( time ); } 01425 01426 void 01427 buildGoalRefAudio( int time, int score ) 01428 { M_parser.doBuildGoalRefAudio( time, score ); } 01429 01430 void 01431 buildUnknownRefAudio( int time, const std::string& message ) 01432 { M_parser.doBuildUnknownRefAudio( time, message ); } 01433 01434 void 01435 buildPlayerAudio( int time, double dir, const std::string& msg ) 01436 { M_parser.doBuildPlayerAudio( time, dir, msg ); } 01437 01438 void 01439 buildPlayerAudio( int time, const std::string& msg ) 01440 { M_parser.doBuildPlayerAudio( time, msg ); } 01441 01442 void 01443 buildPlayerAudio( int time, double dir, int unum, 01444 const std::string& msg ) 01445 { M_parser.doBuildPlayerAudio( time, dir, unum, msg ); } 01446 01447 void 01448 buildPlayerAudio( int time ) 01449 { M_parser.doBuildPlayerAudio( time ); } 01450 01451 void 01452 buildPlayerAudio( int time, int unum ) 01453 { M_parser.doBuildPlayerAudio( time, unum ); } 01454 01455 void 01456 buildSelfAudio( int time, const std::string& msg ) 01457 { M_parser.doBuildSelfAudio( time, msg ); } 01458 01459 void 01460 buildSubstitution( int unum, int type ) 01461 { M_parser.doBuildSubstitution( unum, type ); } 01462 01463 void 01464 buildSubstitution( int unum ) 01465 { M_parser.doBuildSubstitution( unum ); } 01466 01467 void 01468 buildClangPlayerVersionMsg( ) 01469 { M_parser.doBuildClangPlayerVersionMsg( ); } 01470 01471 void 01472 buildClangPlayerVersion( int min, int max ) 01473 { M_parser.doBuildClangPlayerVersion( min, max ); } 01474 01475 void 01476 buildCantReconnect() 01477 { M_parser.doBuildCantReconnect(); } 01478 01479 void 01480 buildInitError() 01481 { M_parser.doBuildInitError(); } 01482 01483 void 01484 buildNoMoreTeamOrPlayerOrGoalieError() 01485 { M_parser.doBuildNoMoreTeamOrPlayerOrGoalieError(); } 01486 01487 void 01488 buildNoSuchTeamOrAlreadyHaveCoachError() 01489 { M_parser.doBuildNoSuchTeamOrAlreadyHaveCoachError(); } 01490 01491 void 01492 buildTooManyMovesError() 01493 { M_parser.doBuildTooManyMovesError(); } 01494 01495 void 01496 buildUnknownCommandError() 01497 { M_parser.doBuildUnknownCommandError(); } 01498 01499 void 01500 buildIllegalCommandError() 01501 { M_parser.doBuildIllegalCommandError(); } 01502 01503 void 01504 buildSayMessageTooLongError() 01505 { M_parser.doBuildSayMessageTooLongError(); } 01506 01507 void 01508 buildIllegalModeError() 01509 { M_parser.doBuildIllegalModeError(); } 01510 01511 void 01512 buildIllegalObjectFormError() 01513 { M_parser.doBuildIllegalObjectFormError(); } 01514 01515 void 01516 buildSaidTooManyFreeformMessagesError() 01517 { M_parser.doBuildSaidTooManyFreeformMessagesError(); } 01518 01519 void 01520 buildCannotSayFreeformWhilePlayonError() 01521 { M_parser.doBuildCannotSayFreeformWhilePlayonError(); } 01522 01523 void 01524 buildSaidTooManyMetaMessagesError() 01525 { M_parser.doBuildSaidTooManyMetaMessagesError(); } 01526 01527 void 01528 buildSaidTooManyAdviceMessagesError() 01529 { M_parser.doBuildSaidTooManyAdviceMessagesError(); } 01530 01531 void 01532 buildSaidTooManyInfoMessagesError() 01533 { M_parser.doBuildSaidTooManyInfoMessagesError(); } 01534 01535 void 01536 buildSaidTooManyDefineMessagesError() 01537 { M_parser.doBuildSaidTooManyDefineMessagesError(); } 01538 01539 void 01540 buildCouldNotParseSayError() 01541 { M_parser.doBuildCouldNotParseSayError(); } 01542 01543 void 01544 buildSaidTooManyMessagesError() 01545 { M_parser.doBuildSaidTooManyMessagesError(); } 01546 01547 void 01548 buildUnknownError( const std::string& error ) 01549 { M_parser.doBuildUnknownError( error ); } 01550 01551 void 01552 buildNoTeamFoundWarning() 01553 { M_parser.doBuildNoTeamFoundWarning(); } 01554 01555 void 01556 buildNoSuchPlayerWarning() 01557 { M_parser.doBuildNoSuchPlayerWarning(); } 01558 01559 void 01560 buildCannotSubWhilePlayOnWarning() 01561 { M_parser.doBuildCannotSubWhilePlayOnWarning(); } 01562 01563 void 01564 buildNoSubsLeftWarning() 01565 { M_parser.doBuildNoSubsLeftWarning(); } 01566 01567 void 01568 buildMaxOfThatPlayerTypeOnFieldWarning() 01569 { M_parser.doBuildMaxOfThatPlayerTypeOnFieldWarning(); } 01570 01571 void 01572 buildCannotChangeGoalieWarning() 01573 { M_parser.doBuildCannotChangeGoalieWarning(); } 01574 01575 void 01576 buildCompressionWarning() 01577 { M_parser.doBuildCompressionWarning(); } 01578 01579 void 01580 buildUnknownWarning( const std::string& warning ) 01581 { M_parser.doBuildUnknownWarning( warning ); } 01582 01583 void 01584 buildClangVerOK( int min, int max ) 01585 { M_parser.doBuildClangVerOK( min, max ); } 01586 01587 void 01588 buildEyeOK( bool on ) 01589 { M_parser.doBuildEyeOK( on ); } 01590 01591 void 01592 buildSayOK( ) 01593 { M_parser.doBuildSayOK( ); } 01594 01595 void 01596 buildChangePlayerTypeOK( int unum, int type ) 01597 { M_parser.doBuildChangePlayerTypeOK( unum, type ); } 01598 01599 void 01600 buildCompressionOK( int level ) 01601 { M_parser.doBuildCompressionOK( level ); } 01602 01603 01604 void 01605 buildUnknownOK( const std::string& msg ) 01606 { M_parser.doBuildUnknownOK( msg ); } 01607 }; 01608 01609 private: 01610 01611 Param M_param; 01612 rcss::Parser& M_clang_parser; 01613 01614 friend int RCC_lex( rcc::Holder*, 01615 rcc::Parser::Param& param ); 01616 friend rcc::Parser::Param& getParam(void*); 01617 friend class Param; 01618 friend class RCCLexer; 01619 01620 01621 virtual 01622 bool 01623 doParse( std::istream& strm ) 01624 { 01625 return ( setStream( strm ) 01626 && ( ::RCC_parse( (void*)&M_param ) == 0 ) ); 01627 } 01628 01629 01630 bool 01631 setStream( std::istream& strm ); 01632 01633 bool 01634 parseCLang( const char* message ); 01635 public: 01636 01645 Parser( rcss::Parser& clang_parser ) 01646 : M_param( *this ), 01647 M_clang_parser( clang_parser ) 01648 {} 01649 01650 virtual 01651 ~Parser() 01652 {} 01653 01654 #ifdef DOXYGEN_ONLY 01655 /* The following functions are actually inherited from rcss::Parser, 01656 but I cannot find a way to document them as such. */ 01657 01659 01660 01669 bool 01670 parse( std::istream& strm ); 01671 01683 bool 01684 parse( const std::string& file ); 01686 #endif 01687 protected: 01695 virtual 01696 void 01697 doMsgParsed() {} 01698 01700 01701 01719 virtual 01720 void 01721 doParsedCLang( const std::string& msg ) 01722 {} 01723 01724 01740 virtual 01741 void 01742 doParsedCLang( const char* msg ) 01743 { doParsedCLang( std::string( msg ) ); } 01745 01746 01748 01749 01873 virtual 01874 void 01875 doBuildFullState( int time ) {} 01876 01877 01918 virtual 01919 void 01920 doBuildCounts( int kick, int dash, int turn, int katch, 01921 int move, int turn_neck, int change_view, int say ) {} 01922 01923 01954 virtual 01955 void 01956 doBuildScore( int our, int opp ) {} 01957 01958 01992 virtual 01993 void 01994 doBuildBall( double x, double y, 01995 double delta_x, double delta_y ) {} 01996 01997 02044 virtual 02045 void 02046 doBuildPlayer( int unum, 02047 double x, double y, 02048 double delta_x, double delta_y, 02049 double orientation, double head_orientation, 02050 int stamina, double effort, double recovery ) {} 02051 02052 02103 virtual 02104 void 02105 doBuildPlayer( int unum, int type, 02106 double pos_x, double pos_y, 02107 double vel_x, double vel_y, 02108 double body_dir, double head_dir, 02109 double stamina, double effort, 02110 double recovery ) {} 02111 02112 02168 virtual 02169 void 02170 doBuildPlayer( int unum, int type, 02171 double pos_x, double pos_y, 02172 double vel_x, double vel_y, 02173 double body_dir, double head_dir, 02174 double arm_mag, double arm_dir, 02175 double stamina, double effort, 02176 double recovery ) {} 02177 02178 02227 virtual 02228 void 02229 doBuildGoalie( int unum, 02230 double pos_x, double pos_y, 02231 double vel_x, double vel_y, 02232 double body_dir, double head_dir, 02233 double stamina, double effort, 02234 double recovery ) {} 02235 02236 02290 virtual 02291 void 02292 doBuildGoalie( int unum, 02293 double pos_x, double pos_y, 02294 double vel_x, double vel_y, 02295 double body_dir, double head_dir, 02296 double arm_mag, double arm_dir, 02297 double stamina, double effort, 02298 double recovery ) {} 02300 02301 02303 02304 02320 virtual 02321 void 02322 doBuildCatchBallLeftPlayMode() {} 02323 02324 02341 virtual 02342 void 02343 doBuildCatchBallRightPlayMode() {} 02344 02345 02364 virtual 02365 void 02366 doBuildBeforeKickOffPlayMode() {} 02367 02368 02387 virtual 02388 void 02389 doBuildTimeOverPlayMode() {} 02390 02391 02410 virtual 02411 void 02412 doBuildPlayOnPlayMode() {} 02413 02414 02433 virtual 02434 void 02435 doBuildKickOffLeftPlayMode() {} 02436 02437 02456 virtual 02457 void 02458 doBuildKickOffRightPlayMode() {} 02459 02460 02479 virtual 02480 void 02481 doBuildKickInLeftPlayMode() {} 02482 02483 02502 virtual 02503 void 02504 doBuildKickInRightPlayMode() {} 02505 02506 02525 virtual 02526 void 02527 doBuildFreeKickLeftPlayMode() {} 02528 02529 02548 virtual 02549 void 02550 doBuildFreeKickRightPlayMode() {} 02551 02552 02571 virtual 02572 void 02573 doBuildCornerKickLeftPlayMode() {} 02574 02575 02594 virtual 02595 void 02596 doBuildCornerKickRightPlayMode() {} 02597 02598 02617 virtual 02618 void 02619 doBuildGoalKickLeftPlayMode() {} 02620 02621 02640 virtual 02641 void 02642 doBuildGoalKickRightPlayMode() {} 02643 02644 02663 virtual 02664 void 02665 doBuildAfterGoalLeftPlayMode() {} 02666 02667 02686 virtual 02687 void 02688 doBuildAfterGoalRightPlayMode() {} 02689 02690 02709 virtual 02710 void 02711 doBuildDropBallPlayMode() {} 02712 02713 02732 virtual 02733 void 02734 doBuildOffSideLeftPlayMode() {} 02735 02736 02755 virtual 02756 void 02757 doBuildOffsideRightPlayMode() {} 02758 02759 02778 virtual 02779 void 02780 doBuildPenaltyKickLeftPlayMode() {} 02781 02782 02801 virtual 02802 void 02803 doBuildPenaltyKickRightPlayMode() {} 02804 02805 02824 virtual 02825 void 02826 doBuildFirstHalfOverPlayMode() {} 02827 02828 02847 virtual 02848 void 02849 doBuildPausePlayMode() {} 02850 02851 02870 virtual 02871 void 02872 doBuildHumanPlayMode() {} 02873 02874 02893 virtual 02894 void 02895 doBuildFoulLeftPlayMode() {} 02896 02897 02916 virtual 02917 void 02918 doBuildFoulRightPlayMode() {} 02919 02920 02939 virtual 02940 void 02941 doBuildFoulChargeLeftPlayMode() {} 02942 02943 02962 virtual 02963 void 02964 doBuildFoulChargeRightPlayMode() {} 02965 02966 02985 virtual 02986 void 02987 doBuildFoulPushLeftPlayMode() {} 02988 02989 03008 virtual 03009 void 03010 doBuildFoulPushRightPlayMode() {} 03011 03012 03031 virtual 03032 void 03033 doBuildFoulMultipleAttackerLeftPlayMode() {} 03034 03035 03054 virtual 03055 void 03056 doBuildFoulMultipleAttackerRightPlayMode() {} 03057 03058 03077 virtual 03078 void 03079 doBuildFoulBallOutLeftPlayMode() {} 03080 03081 03100 virtual 03101 void 03102 doBuildFoulBallOutRightPlayMode() {} 03103 03104 03123 virtual 03124 void 03125 doBuildBackPassLeftPlayMode() {} 03126 03127 03146 virtual 03147 void 03148 doBuildBackPassRightPlayMode() {} 03149 03150 03169 virtual 03170 void 03171 doBuildFreeKickFaultLeftPlayMode() {} 03172 03173 03192 virtual 03193 void 03194 doBuildFreeKickFaultRightPlayMode() {} 03195 03214 virtual 03215 void 03216 doBuildCatchFaultLeftPlayMode() {} 03217 03236 virtual 03237 void 03238 doBuildCatchFaultRightPlayMode() {} 03239 03258 virtual 03259 void 03260 doBuildIndirectFreeKickLeftPlayMode() {} 03261 03280 virtual 03281 void 03282 doBuildIndirectFreeKickRightPlayMode() {} 03283 03302 virtual 03303 void 03304 doBuildPenaltySetupLeftPlaymode() {} 03305 03324 virtual 03325 void 03326 doBuildPenaltySetupRightPlaymode() {} 03327 03346 virtual 03347 void 03348 doBuildPenaltyReadyLeftPlaymode() {} 03349 03368 virtual 03369 void 03370 doBuildPenaltyReadyRightPlaymode() {} 03371 03390 virtual 03391 void 03392 doBuildPenaltyTakenLeftPlaymode() {} 03393 03412 virtual 03413 void 03414 doBuildPenaltyTakenRightPlaymode() {} 03415 03434 virtual 03435 void 03436 doBuildPenaltyMissLeftPlaymode() {} 03437 03456 virtual 03457 void 03458 doBuildPenaltyMissRightPlaymode() {} 03459 03478 virtual 03479 void 03480 doBuildPenaltyScoreLeftPlaymode() {} 03481 03500 virtual 03501 void 03502 doBuildPenaltyScoreRightPlaymode() {} 03503 03516 virtual 03517 void 03518 doBuildPenaltyOnFieldLeftPlaymode() {} 03519 03532 virtual 03533 void 03534 doBuildPenaltyOnFieldRightPlaymode() {} 03535 03548 virtual 03549 void 03550 doBuildPenaltyFoulLeftPlaymode() {} 03551 03564 virtual 03565 void 03566 doBuildPenaltyFoulRightPlaymode() {} 03567 03580 virtual 03581 void 03582 doBuildPenaltyWinnerLeftPlaymode() {} 03583 03596 virtual 03597 void 03598 doBuildPenaltyWinnerRightPlaymode() {} 03599 03612 virtual 03613 void 03614 doBuildPenaltyDrawPlaymode() {} 03615 03617 03619 03620 03668 virtual 03669 void 03670 doBuildLeftSide() {} 03671 03719 virtual 03720 void 03721 doBuildRightSide() {} 03722 03739 virtual 03740 void 03741 doBuildOppSide() {} 03742 03759 virtual 03760 void 03761 doBuildOurSide() {} 03762 03775 virtual 03776 void 03777 doBuildNeutralSide() {} 03779 03781 03782 03896 virtual 03897 void 03898 doBuildSenseBody( int time, 03899 double stamina, 03900 double effort, 03901 double speed_mag, 03902 double speed_head, 03903 double head_angle, 03904 int kick_count, 03905 int dash_count, 03906 int turn_count, 03907 int say_count, 03908 int turn_neck_count, 03909 int catch_count, 03910 int move_count, 03911 int chg_view_count ) 03912 { 03913 doBuildSenseBody( time, 03914 (int)stamina, (int)effort, 03915 speed_mag, speed_head, head_angle, 03916 kick_count, dash_count, turn_count, say_count, 03917 turn_neck_count, catch_count, 03918 move_count, chg_view_count ); 03919 } 03920 03921 04050 virtual 04051 void 04052 doBuildSenseBody( int time, 04053 int stamina, 04054 int effort, 04055 double speed_mag, 04056 double speed_head, 04057 double head_angle, 04058 int kick_count, 04059 int dash_count, 04060 int turn_count, 04061 int say_count, 04062 int turn_neck_count, 04063 int catch_count, 04064 int move_count, 04065 int chg_view_count ) 04066 {} 04067 04068 04137 virtual 04138 void 04139 doBuildArmState( int movable_in, 04140 int expires_in, 04141 double target_x, 04142 double target_y, 04143 int count ) {} 04144 04201 virtual 04202 void 04203 doBuildFocusState( int count ) {} 04204 04264 virtual 04265 void 04266 doBuildFocusState( int unum, int count ) {} 04267 04268 04325 virtual 04326 void 04327 doBuildTackleState( int expires_in, int count ) {} 04329 04330 04331 04333 04334 04394 virtual 04395 void 04396 doBuildViewMode() {} 04397 04398 04450 virtual 04451 void 04452 doBuildViewQualityHigh() {} 04453 04454 04506 virtual 04507 void 04508 doBuildViewQualityLow() {} 04509 04510 04563 virtual 04564 void 04565 doBuildViewWidthNarrow() {} 04566 04567 04620 virtual 04621 void 04622 doBuildViewWidthNormal() {} 04623 04624 04677 virtual 04678 void 04679 doBuildViewWidthWide() {} 04681 04682 04684 04685 04813 virtual 04814 void 04815 doBuildServerParam ( double gwidth, 04816 double inertia_moment, 04817 double psize, 04818 double pdecay, 04819 double prand, 04820 double pweight, 04821 double pspeed_max, 04822 double paccel_max, 04823 double stamina_max, 04824 double stamina_inc, 04825 double recover_init, 04826 double recover_dthr, 04827 double recover_min, 04828 double recover_dec, 04829 double effort_init, 04830 double effort_dthr, 04831 double effort_min, 04832 double effort_dec, 04833 double effort_ithr, 04834 double effort_inc, 04835 double kick_rand, 04836 int team_actuator_noise, 04837 double prand_factor_l, 04838 double prand_factor_r, 04839 double kick_rand_factor_l, 04840 double kick_rand_factor_r, 04841 double bsize, 04842 double bdecay, 04843 double brand, 04844 double bweight, 04845 double bspeed_max, 04846 double baccel_max, 04847 double dprate, 04848 double kprate, 04849 double kmargin, 04850 double ctlradius, 04851 double ctlradius_width, 04852 double maxp, 04853 double minp, 04854 double maxm, 04855 double minm, 04856 double maxnm, 04857 double minnm, 04858 double maxn, 04859 double minn, 04860 double visangle, 04861 double visdist, 04862 double windir, 04863 double winforce, 04864 double winang, 04865 double winrand, 04866 double kickable_area, 04867 double catch_area_l, 04868 double catch_area_w, 04869 double catch_prob, 04870 int goalie_max_moves, 04871 double ckmargin, 04872 double offside_area, 04873 int win_no, 04874 int win_random, 04875 int say_cnt_max, 04876 int SayCoachMsgSize, 04877 int clang_win_size, 04878 int clang_define_win, 04879 int clang_meta_win, 04880 int clang_advice_win, 04881 int clang_info_win, 04882 int clang_mess_delay, 04883 int clang_mess_per_cycle, 04884 int half_time, 04885 int sim_st, 04886 int send_st, 04887 int recv_st, 04888 int sb_step, 04889 int lcm_st, 04890 int SayMsgSize, 04891 int hear_max, 04892 int hear_inc, 04893 int hear_decay, 04894 int cban_cycle, 04895 int slow_down_factor, 04896 int useoffside, 04897 int kickoffoffside, 04898 double offside_kick_margin, 04899 double audio_dist, 04900 double dist_qstep, 04901 double land_qstep, 04902 double dir_qstep, 04903 double dist_qstep_l, 04904 double dist_qstep_r, 04905 double land_qstep_l, 04906 double land_qstep_r, 04907 double dir_qstep_l, 04908 double dir_qstep_r, 04909 int CoachMode, 04910 int CwRMode, 04911 int old_hear, 04912 int sv_st, 04913 int start_goal_l, 04914 int start_goal_r, 04915 int fullstate_l, 04916 int fullstate_r, 04917 int drop_time ) {} 04918 05083 virtual 05084 void 05085 doBuildServerParam() {} 05086 05087 05124 virtual 05125 void 05126 doBuildParam( const std::string& name, 05127 int value ) {} 05128 05129 05166 virtual 05167 void 05168 doBuildParam( const std::string& name, 05169 double value ) {} 05170 05171 05208 virtual 05209 void 05210 doBuildParam( const std::string& name, 05211 const std::string& value ) {} 05212 05213 05255 virtual 05256 void 05257 doBuildPlayerParam( int player_types, 05258 int subs_max, 05259 int pt_max, 05260 double player_speed_max_delta_min, 05261 double player_speed_max_delta_max, 05262 double stamina_inc_max_delta_factor, 05263 double player_decay_delta_min, 05264 double player_decay_delta_max, 05265 double inertia_moment_delta_factor, 05266 double dash_power_rate_delta_min, 05267 double dash_power_rate_delta_max, 05268 double player_size_delta_factor, 05269 double kickable_margin_delta_min, 05270 double kickable_margin_delta_max, 05271 double kick_rand_delta_factor, 05272 double extra_stamina_delta_min, 05273 double extra_stamina_delta_max, 05274 double effort_max_delta_factor, 05275 double effort_min_delta_factor ) {} 05276 05277 05331 virtual 05332 void 05333 doBuildPlayerParam() {} 05334 05335 05381 virtual 05382 void 05383 doBuildPlayerType ( int id, 05384 double player_speed_max, 05385 double stamina_inc_max, 05386 double player_decay, 05387 double inertia_moment, 05388 double dash_power_rate, 05389 double player_size, 05390 double kickable_margin, 05391 double kick_rand, 05392 double extra_stamina, 05393 double effort_max, 05394 double effort_min ) {} 05395 05396 05435 virtual 05436 void 05437 doBuildPlayerType() {} 05439 05440 05442 05443 05555 virtual 05556 void 05557 doBuildVisual( int time ) {} 05558 05594 virtual 05595 void 05596 doBuildLine( double dist, double dir ) {} 05597 05631 virtual 05632 void 05633 doBuildLine( double dir ) {} 05634 05635 05692 virtual 05693 void 05694 doBuildFlag( bool close, 05695 double dist, double dir, 05696 double dist_chg, double dir_chg ) {} 05697 05748 virtual 05749 void 05750 doBuildFlag( double dist, double dir, 05751 double dist_chg, double dir_chg ) 05752 { 05753 doBuildFlag( false, dist, dir, dist_chg, dir_chg ); 05754 } 05755 05807 virtual 05808 void 05809 doBuildFlag( bool close, double dist, double dir ) {} 05810 05859 virtual 05860 void 05861 doBuildFlag( bool close, double dir ) {} 05862 05913 virtual 05914 void 05915 doBuildGoal( bool close, 05916 double dist, double dir, 05917 double dist_chg, double dir_chg ) {} 05918 05919 05964 virtual 05965 void 05966 doBuildGoal( double dist, double dir, 05967 double dist_chg, double dir_chg ) 05968 { 05969 doBuildGoal( false, dist, dir, dist_chg, dir_chg ); 05970 } 05971 06019 virtual 06020 void 06021 doBuildGoal( bool close, double dist, double dir ) {} 06022 06068 virtual 06069 void 06070 doBuildGoal( bool close, double dir ) {} 06071 06118 virtual 06119 void 06120 doBuildBall( bool close, 06121 double dist, double dir, 06122 double dist_chg, double dir_chg ) {} 06123 06124 06125 06166 virtual 06167 void 06168 doBuildPlayerVisBall( double dist, double dir, 06169 double dist_chg, double dir_chg ) 06170 { 06171 doBuildBall( false, dist, dir, dist_chg, dir_chg ); 06172 } 06173 06219 virtual 06220 void 06221 doBuildBall( bool close, double dist, double dir ) {} 06222 06266 virtual 06267 void 06268 doBuildBall( bool close, double dir ) {} 06269 06354 virtual 06355 void 06356 doBuildPlayer( bool close, 06357 double dist, double dir, 06358 double dist_chg, double dir_chg, 06359 double orientation, double head_orientation, 06360 double point_dir, bool tackling ) 06361 { 06362 doBuildPlayer( close, dist, dir, dist_chg, dir_chg, 06363 orientation, head_orientation ); 06364 } 06365 06442 virtual 06443 void 06444 doBuildPlayer( double dist, double dir, 06445 double dist_chg, double dir_chg, 06446 double orientation, double head_orientation, 06447 double point_dir, bool tackling ) 06448 { 06449 doBuildPlayer( false, dist, dir, dist_chg, dir_chg, 06450 orientation, head_orientation, tackling ); 06451 } 06452 06547 virtual 06548 void 06549 doBuildPlayer( bool close, 06550 double dist, double dir, 06551 double dist_chg, double dir_chg, 06552 double orientation, double head_orientation, 06553 bool tackling ) 06554 { 06555 doBuildPlayer( close, dist, dir, dist_chg, dir_chg, 06556 orientation, head_orientation ); 06557 } 06558 06638 virtual 06639 void 06640 doBuildPlayer( double dist, double dir, 06641 double dist_chg, double dir_chg, 06642 double orientation, double head_orientation, 06643 bool tackling ) 06644 { 06645 doBuildPlayer( false, dist, dir, dist_chg, dir_chg, 06646 orientation, head_orientation, tackling ); 06647 } 06648 06654 virtual 06655 void 06656 doBuildPlayer( bool close, 06657 double dist, double dir, 06658 double dist_chg, double dir_chg, 06659 double point_dir, bool tackling ) 06660 { 06661 doBuildPlayer( close, dist, dir, dist_chg, dir_chg ); 06662 } 06663 06669 virtual 06670 void 06671 doBuildPlayer( double dist, double dir, 06672 double dist_chg, double dir_chg, 06673 double point_dir, bool tackling ) 06674 { 06675 doBuildPlayer( false, dist, dir, dist_chg, dir_chg, tackling ); 06676 } 06677 06683 virtual 06684 void 06685 doBuildPlayer( bool close, 06686 double dist, double dir, 06687 double dist_chg, double dir_chg, 06688 bool tackling ) 06689 { 06690 doBuildPlayer( close, dist, dir, dist_chg, dir_chg ); 06691 } 06692 06698 virtual 06699 void 06700 doBuildPlayer( double dist, double dir, 06701 double dist_chg, double dir_chg, 06702 bool tackling ) 06703 { 06704 doBuildPlayer( false, dist, dir, dist_chg, dir_chg, tackling ); 06705 } 06706 06785 virtual 06786 void 06787 doBuildPlayer( bool close, double dist, double dir, 06788 double point_dir, bool tackling ) 06789 { 06790 doBuildPlayer( close, dist, dir ); 06791 } 06792 06865 virtual 06866 void 06867 doBuildPlayer( double dist, double dir, 06868 double point_dir, bool tackling ) 06869 { 06870 doBuildPlayer( false, dist, dir, tackling ); 06871 } 06872 06873 06945 virtual 06946 void 06947 doBuildPlayer( bool close, double dist, double dir, 06948 bool tackling ) 06949 { 06950 doBuildPlayer( close, dist, dir ); 06951 } 06952 06953 07045 virtual 07046 void 07047 doBuildPlayer( bool close, 07048 double dist, double dir, 07049 double dist_chg, double dir_chg, 07050 double orientation, double head_orientation ) {} 07051 07052 07058 virtual 07059 void 07060 doBuildPlayer( bool close, 07061 double dist, double dir, 07062 double dist_chg, double dir_chg ) {} 07063 07137 virtual 07138 void 07139 doBuildPlayer( bool close, double dist, double dir ) {} 07140 07206 virtual 07207 void 07208 doBuildPlayer( bool close, double dir ) {} 07210 07211 07212 07214 07215 07228 virtual 07229 void 07230 doBuildGlobalVisual( int time ) {} 07231 07251 virtual 07252 void 07253 doBuildGlobalGoal( double x, double y ) {} 07254 07278 virtual 07279 void 07280 doBuildGlobalBall( double x, double y, 07281 double delta_x, double delta_y ) {} 07282 07316 virtual 07317 void 07318 doBuildGlobalPlayer( double x, double y, 07319 double delta_x, double delta_y, 07320 double orientation, double head_orientation, 07321 double point_dir, bool tackle ) 07322 { 07323 doBuildGlobalPlayer( x, y, 07324 delta_x, delta_y, 07325 orientation, head_orientation ); 07326 } 07327 07360 virtual 07361 void 07362 doBuildGlobalPlayer( double x, double y, 07363 double delta_x, double delta_y, 07364 double orientation, double head_orientation, 07365 bool tackle ) 07366 { 07367 doBuildGlobalPlayer( x, y, 07368 delta_x, delta_y, 07369 orientation, head_orientation ); 07370 } 07371 07372 07408 virtual 07409 void 07410 doBuildGlobalPlayer( double x, double y, 07411 double delta_x, double delta_y, 07412 double orientation, double head_orientation ) {} 07414 07415 07416 07418 07419 07443 virtual 07444 void 07445 doBuildFlagOffset( int offset ) {} 07446 07447 07461 virtual 07462 void 07463 doBuildTopLocation() {} 07464 07465 07479 virtual 07480 void 07481 doBuildBottomLocation() {} 07482 07496 virtual 07497 void 07498 doBuildLeftLocation() {} 07499 07513 virtual 07514 void 07515 doBuildRightLocation() {} 07516 07530 virtual 07531 void 07532 doBuildCenterLocation() {} 07533 07547 virtual 07548 void 07549 doBuildPenaltyLocation() {} 07550 07564 virtual 07565 void 07566 doBuildGoalLocation() {} 07568 07576 virtual 07577 void 07578 doBuildTeamName( const std::string& name ) {} 07579 07587 virtual 07588 void 07589 doBuildUNum( int unum ) {} 07590 07600 virtual 07601 void 07602 doBuildGoalie() {} 07603 07611 virtual 07612 void 07613 doBuildScore( int time, int our, int opp ) {} 07614 07615 07617 07618 07628 virtual 07629 void 07630 doBuildInit( int unum ) {} 07631 07641 virtual 07642 void 07643 doBuildInit() {} 07644 07655 virtual 07656 void 07657 doBuildCoachInit() {} 07659 07660 07661 07663 07664 07674 virtual 07675 void 07676 doBuildCoachAudio( int time, const std::string& msg ) {} 07677 07686 virtual 07687 void 07688 doBuildRefAudio( int time ) {} 07689 07698 virtual 07699 void 07700 doBuildGoalRefAudio( int time, int score ) {} 07701 07714 virtual 07715 void 07716 doBuildUnknownRefAudio( int time, const std::string& message ) {} 07717 07735 virtual 07736 void 07737 doBuildPlayerAudio( int time, double dir, const std::string& msg ) {} 07738 07750 virtual 07751 void 07752 doBuildPlayerAudio( int time, const std::string& msg ) {} 07753 07770 virtual 07771 void 07772 doBuildPlayerAudio( int time, double dir, int unum, 07773 const std::string& msg ) {} 07774 07793 virtual 07794 void 07795 doBuildPlayerAudio( int time, int unum ) {} 07796 07815 virtual 07816 void 07817 doBuildPlayerAudio( int time ) {} 07818 07834 virtual 07835 void 07836 doBuildSelfAudio( int time, const std::string& msg ) {} 07838 07839 07840 07842 07843 07857 virtual 07858 void 07859 doBuildSubstitution( int unum, int type ) {} 07860 07875 virtual 07876 void 07877 doBuildSubstitution( int unum ) {} 07879 07881 07882 07894 virtual 07895 void 07896 doBuildClangPlayerVersionMsg( ) {} 07897 07908 virtual 07909 void 07910 doBuildClangPlayerVersion( int min, int max ) {} 07912 07913 07915 07916 07932 virtual 07933 void 07934 doBuildCantReconnect() {} 07935 07956 virtual 07957 void 07958 doBuildInitError() {} 07959 07988 virtual 07989 void 07990 doBuildNoMoreTeamOrPlayerOrGoalieError() {} 07991 08017 virtual 08018 void 08019 doBuildNoSuchTeamOrAlreadyHaveCoachError() {} 08020 08040 virtual 08041 void 08042 doBuildTooManyMovesError() {} 08043 08056 virtual 08057 void 08058 doBuildUnknownCommandError() {} 08059 08072 virtual 08073 void 08074 doBuildIllegalCommandError() {} 08075 08087 virtual 08088 void 08089 doBuildSayMessageTooLongError() {} 08090 08106 virtual 08107 void 08108 doBuildIllegalModeError() {} 08109 08126 virtual 08127 void 08128 doBuildIllegalObjectFormError() {} 08129 08145 virtual 08146 void 08147 doBuildSaidTooManyFreeformMessagesError() {} 08148 08164 virtual 08165 void 08166 doBuildCannotSayFreeformWhilePlayonError() {} 08167 08183 virtual 08184 void 08185 doBuildSaidTooManyMetaMessagesError() {} 08186 08202 virtual 08203 void 08204 doBuildSaidTooManyAdviceMessagesError() {} 08205 08221 virtual 08222 void 08223 doBuildSaidTooManyInfoMessagesError() {} 08224 08240 virtual 08241 void 08242 doBuildSaidTooManyDefineMessagesError() {} 08243 08258 virtual 08259 void 08260 doBuildCouldNotParseSayError() {} 08261 08277 virtual 08278 void 08279 doBuildSaidTooManyMessagesError() {} 08280 08297 virtual 08298 void 08299 doBuildUnknownError( const std::string& error ) {} 08301 08302 08303 08305 08306 08321 virtual 08322 void 08323 doBuildNoTeamFoundWarning() {} 08324 08340 virtual 08341 void 08342 doBuildNoSuchPlayerWarning() {} 08343 08359 virtual 08360 void 08361 doBuildCannotSubWhilePlayOnWarning() {} 08362 08379 virtual 08380 void 08381 doBuildNoSubsLeftWarning() {} 08382 08399 virtual 08400 void 08401 doBuildMaxOfThatPlayerTypeOnFieldWarning() {} 08402 08418 virtual 08419 void 08420 doBuildCannotChangeGoalieWarning() {} 08421 08436 virtual 08437 void 08438 doBuildCompressionWarning() {} 08439 08456 virtual 08457 void 08458 doBuildUnknownWarning( const std::string& warning ) {} 08460 08461 08462 08464 08465 08479 virtual 08480 void 08481 doBuildClangVerOK( int min, int max ) {} 08482 08497 virtual 08498 void 08499 doBuildEyeOK( bool on ) {} 08500 08515 virtual 08516 void 08517 doBuildSayOK( ) {} 08518 08533 virtual 08534 void 08535 doBuildChangePlayerTypeOK( int unum, int type ) {} 08536 08549 virtual 08550 void 08551 doBuildCompressionOK( int level ) {} 08552 08569 virtual 08570 void 08571 doBuildUnknownOK( const std::string& msg ) {} 08573 08574 08575 }; 08576 } 08577 08578 #endif |
©2001-2003 Tom Howard. All Rights Reserved.
Suggestions? Email the Webmaster!