LIBRCSC Docs
Documentation for HELIOS's BASE LIBRCSC library for RoboCup 2D Simulation League.
All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros
Classes | Public Types | Public Member Functions | Static Public Attributes | List of all members
rcsc::TeamGraphic Class Reference

team graphic data management class More...

#include <team_graphic.h>

Classes

class  XpmTile
 8x8 pixels xpm data contained by the TeamGraphic More...
 

Public Types

typedef std::shared_ptr< XpmTilePtr
 XpmTile pointer.
 
typedef std::shared_ptr< const XpmTileConstPtr
 XpmTile pointer.
 
typedef std::pair< int, int > Index
 xpm tile index
 
typedef std::map< Index, const PtrMap
 xpm tile map
 

Public Member Functions

 TeamGraphic ()
 initialize member variables with illegal values.
 
void clear ()
 erase all data
 
int width () const
 geth the total width of this team graphic More...
 
int height () const
 geth the total height of this team graphic More...
 
const std::vector< std::shared_ptr< std::string > > & colors () const
 get the xpm color data strings More...
 
const Maptiles () const
 get the tiled xpm data More...
 
bool createXpmTiles (const char *const *xpm_data)
 create tiled xpm from the raw xpm data More...
 
bool parse (const char *server_msg)
 analyze team_graphic_? message from rcssserver & add new xpm tile More...
 
bool readXpmFile (const char *file_path)
 read xpm data from the input file More...
 
bool isValid () const
 check if all xpm tiles have been completed or not More...
 
std::ostream & print (std::ostream &os) const
 output all tiled xpm data More...
 

Static Public Attributes

static const int MAX_WIDTH
 max pixel width of the team graphic
 
static const int MAX_HEIGHT
 max pixel height of the team graphic
 
static const int TILE_SIZE
 tile size unit
 
static const int MAX_COLOR
 max colors
 

Detailed Description

team graphic data management class

Member Function Documentation

◆ colors()

const std::vector< std::shared_ptr< std::string > > & rcsc::TeamGraphic::colors ( ) const
inline

get the xpm color data strings

Returns
color strings container

◆ createXpmTiles()

bool rcsc::TeamGraphic::createXpmTiles ( const char *const *  xpm_data)

create tiled xpm from the raw xpm data

Parameters
xpm_dataraw xpm string array
Returns
true if successfully parsed

◆ height()

int rcsc::TeamGraphic::height ( ) const
inline

geth the total height of this team graphic

Returns
pixel height value

◆ isValid()

bool rcsc::TeamGraphic::isValid ( ) const

check if all xpm tiles have been completed or not

Returns
checked result

◆ parse()

bool rcsc::TeamGraphic::parse ( const char *  server_msg)

analyze team_graphic_? message from rcssserver & add new xpm tile

Parameters
server_msgraw server message
Returns
true if successfully analyzed

◆ print()

std::ostream & rcsc::TeamGraphic::print ( std::ostream &  os) const

output all tiled xpm data

Parameters
osreference to the output stream
Returns
reference to the output stream

◆ readXpmFile()

bool rcsc::TeamGraphic::readXpmFile ( const char *  file_path)

read xpm data from the input file

Parameters
file_pathinput file path
Returns
parsing result

◆ tiles()

const Map & rcsc::TeamGraphic::tiles ( ) const
inline

get the tiled xpm data

Returns
tiled xpm data map container

◆ width()

int rcsc::TeamGraphic::width ( ) const
inline

geth the total width of this team graphic

Returns
pixel width value

The documentation for this class was generated from the following file: