Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

InitCommand.cc

Go to the documentation of this file.
00001 /* -*- Mode: C++ -*-
00002  * $Id: InitCommand.cc,v 1.1 2006/09/06 18:03:24 frehe Exp $
00003  *
00004  *
00005  * COPYRIGHT INFORMATION
00006  *
00007  * This file is part of RoboSoc created by Fredrik Heintz <frehe@ida.liu.se>
00008  * Copyright (C) 1999, 2000 Fredrik Heintz, Linköping University, Sweden
00009  *
00010  * You are allowed to modify and use this code as long as you retain this
00011  * notice. If you make any changes or have any comments I would appreciate
00012  * it if you send me a message. For more information, please see
00013  * http://www.ida.liu.se/~frehe/RoboCup/RoboSoc/
00014  *
00015  *
00016  * IDENTIFICATION
00017  *
00018  * Filename: InitCommand.cc
00019  * Unitname: Library
00020  * $Revision: 1.1 $
00021  * Created by: Fredrik Heintz 2000-xx-xx
00022  * Last modified by $Author: frehe $ $Date: 2006/09/06 18:03:24 $
00023  *
00024  *
00025  * HISTORY
00026  *
00027  * $Log: InitCommand.cc,v $
00028  * Revision 1.1  2006/09/06 18:03:24  frehe
00029  * Moved files from Library to BasicSystem.
00030  *
00031  * Revision 1.4  2003/07/21 09:11:49  s02davro
00032  * Changed and updated the command hierarchy
00033  *
00034  * Revision 1.3  2002/12/07 17:31:01  s02davro
00035  * InitCommand handle trainer
00036  *
00037  * Revision 1.2  2000/09/09 11:49:53  frehe
00038  * Added a new level in the command hieararchy, namely ImmediateCommand and PeriodicCommand.
00039  *
00040  * Revision 1.1  2000/09/02 14:16:28  frehe
00041  * Imported the current version of RoboSoc (soon to be v2.5.0)
00042  *
00043  */
00044 
00057 #include "InitCommand.h"
00058 #include "string_utils.h"
00059 
00060 
00061 RS_BEGIN_NAMESPACE
00062 
00063 
00064 InitCommand::InitCommand(const std::string& team_name,
00065        const Float ver,
00066        const bool goalie)
00067   : ImmediateCommand(CMD_Init),
00068     teamName(team_name),
00069     version(ver),
00070     goalKeeper(goalie) {}
00071 
00072 InitCommand::~InitCommand() {
00073 }
00074 
00075 const std::string InitCommand::serverString() const {
00076   return "(init " + teamName + " (version " + toString(version) + ")" + 
00077     ((goalKeeper) ? " (goalie))" : ")");
00078 }
00079 
00080 InitCommand* InitCommand::clone() const {
00081   return new InitCommand(*this);
00082 }
00083 
00084 
00085 RS_END_NAMESPACE

Generated on Mon Aug 29 07:57:57 2011 for RoboSoc by doxygen1.3-rc3