クラス rcsc::Logger

log output manager [詳細]

#include <logger.h>

すべてのメンバ一覧

Public メソッド

 Logger ()
 allocate message buffer memory
 ~Logger ()
 if file is opened, flush buffer and close file.
void setLogFlag (const GameTime *time, const boost::int32_t id, const bool on=true)
 set new flag Id
bool isLogFlag (const boost::int32_t id) const
 check if level is included
void open (const char *file_path)
 open file to record
bool isOpen ()
 check if file is opend
void print (const char *msg)
 put message to file directry. no flush. Do NOT use this method by yourself.
void flush ()
 flush stored message
void clear ()
 clear buffer without flush
void addText (const boost::int32_t id, const char *msg,...)
 add free message to buffer with cycle, level & message tag 'T'
void addPoint (const boost::int32_t id, const double &x, const double &y, const char *color=NULL)
 add point info to buffer with cycle, level & message tag 'p'
void addPoint (const boost::int32_t id, const Vector2D &pos, const char *color=NULL)
void addPoint (const boost::int32_t id, const double &x, const double &y, const char r, const char g, const char b)
 add point info to buffer with cycle, level & message tag 'p'
void addPoint (const boost::int32_t id, const Vector2D &pos, const char r, const char g, const char b)
void addLine (const boost::int32_t id, const double &x1, const double &y1, const double &x2, const double &y2, const char *color=NULL)
 add line info to buffer with cycle, level & message tag 'l'
void addLine (const boost::int32_t id, const Vector2D &start, const Vector2D &end, const char *color=NULL)
void addLine (const boost::int32_t id, const double &x1, const double &y1, const double &x2, const double &y2, const char r, const char g, const char b)
 add line info to buffer with cycle, level & message tag 'l'
void addLine (const boost::int32_t id, const Vector2D &start, const Vector2D &end, const char r, const char g, const char b)
void addCircle (const boost::int32_t id, const double &x, const double &y, const double &radius, const char *color=NULL)
 add circle info to buffer with cycle, level & message tag 'c'
void addCircle (const boost::int32_t id, const Vector2D &center, const double &radius, const char *color=NULL)
void addCircle (const boost::int32_t id, const Circle2D &circle, const char *color=NULL)
void addCircle (const boost::int32_t id, const double &x, const double &y, const double &radius, const char r, const char g, const char b)
 add circle info to buffer with cycle, level & message tag 'c'
void addCircle (const boost::int32_t id, const Vector2D &center, const double &radius, const char r, const char g, const char b)
void addCircle (const boost::int32_t id, const Circle2D &circle, const char r, const char g, const char b)
void addTriangle (const boost::int32_t id, const double &x1, const double &y1, const double &x2, const double &y2, const double &x3, const double &y3, const char *color=NULL)
 add triangle info to buffer with cycle, level & message tag 't'
void addTriangle (const boost::int32_t id, const Vector2D &p1, const Vector2D &p2, const Vector2D &p3, const char *color=NULL)
void addTriangle (const boost::int32_t id, const Triangle2D &tri, const char *color=NULL)
void addTriangle (const boost::int32_t id, const double &x1, const double &y1, const double &x2, const double &y2, const double &x3, const double &y3, const char r, const char g, const char b)
 add triangle info to buffer with cycle, level & message tag 't'
void addTriangle (const boost::int32_t id, const Vector2D &p1, const Vector2D &p2, const Vector2D &p3, const char r, const char g, const char b)
void addTriangle (const boost::int32_t id, const Triangle2D &tri, const char r, const char g, const char b)
void addRect (const boost::int32_t id, const double &left, const double &top, const double &length, const double &width, const char *color=NULL)
 add rect info to buffer with cycle, level & message tag 'r'
void addRect (const boost::int32_t id, const Rect2D &rect, const char *color=NULL)
void addRect (const boost::int32_t id, const double &left, const double &top, const double &length, const double &width, const char r, const char g, const char b)
 add rect info to buffer with cycle, level & message tag 'r'
void addRect (const boost::int32_t id, const Rect2D &rect, const char r, const char g, const char b)
void addMessage (const boost::int32_t id, const double &x, const double &y, const char *msg, const char *color=NULL)
 add message info to buffer with cycle, level & message tag 'm'
void addMessage (const boost::int32_t id, const Vector2D &pos, const char *msg, const char *color=NULL)
void addMessage (const boost::int32_t id, const double &x, const double &y, const char *msg, const char r, const char g, const char b)
 add message info to buffer with cycle, level & message tag 'm'
void addMessage (const boost::int32_t id, const Vector2D &pos, const char *msg, const char r, const char g, const char b)

Static Public 変数

static const boost::int32_t LEVEL_00 = 0x00000000
static const boost::int32_t LEVEL_01 = 0x00000001
static const boost::int32_t LEVEL_02 = 0x00000002
static const boost::int32_t LEVEL_03 = 0x00000004
static const boost::int32_t LEVEL_04 = 0x00000008
static const boost::int32_t LEVEL_05 = 0x00000010
static const boost::int32_t LEVEL_06 = 0x00000020
static const boost::int32_t LEVEL_07 = 0x00000040
static const boost::int32_t LEVEL_08 = 0x00000080
static const boost::int32_t LEVEL_09 = 0x00000100
static const boost::int32_t LEVEL_10 = 0x00000200
static const boost::int32_t LEVEL_11 = 0x00000400
static const boost::int32_t LEVEL_12 = 0x00000800
static const boost::int32_t LEVEL_13 = 0x00001000
static const boost::int32_t LEVEL_14 = 0x00002000
static const boost::int32_t LEVEL_15 = 0x00004000
static const boost::int32_t LEVEL_16 = 0x00008000
static const boost::int32_t LEVEL_17 = 0x00010000
static const boost::int32_t LEVEL_18 = 0x00020000
static const boost::int32_t LEVEL_19 = 0x00040000
static const boost::int32_t LEVEL_20 = 0x00080000
static const boost::int32_t LEVEL_21 = 0x00100000
static const boost::int32_t LEVEL_22 = 0x00200000
static const boost::int32_t LEVEL_23 = 0x00400000
static const boost::int32_t LEVEL_24 = 0x00800000
static const boost::int32_t LEVEL_25 = 0x01000000
static const boost::int32_t LEVEL_26 = 0x02000000
static const boost::int32_t LEVEL_27 = 0x04000000
static const boost::int32_t LEVEL_28 = 0x08000000
static const boost::int32_t LEVEL_29 = 0x10000000
static const boost::int32_t LEVEL_30 = 0x20000000
static const boost::int32_t LEVEL_31 = 0x40000000
static const boost::int32_t LEVEL_32 = 0x80000000
static const boost::int32_t LEVEL_ANY = 0xffffffff
static const boost::int32_t SYSTEM = LEVEL_01
static const boost::int32_t SENSOR = LEVEL_02
static const boost::int32_t WORLD = LEVEL_03
static const boost::int32_t ACTION = LEVEL_04
static const boost::int32_t INTERCEPT = LEVEL_05
static const boost::int32_t KICK = LEVEL_06
static const boost::int32_t DRIBBLE = LEVEL_07
static const boost::int32_t PASS = LEVEL_08
static const boost::int32_t CROSS = LEVEL_09
static const boost::int32_t SHOOT = LEVEL_10
static const boost::int32_t CLEAR = LEVEL_11
static const boost::int32_t TEAM = LEVEL_12
static const boost::int32_t ROLE = LEVEL_13


説明

log output manager


関数

void rcsc::Logger::setLogFlag ( const GameTime time,
const boost::int32_t  id,
const bool  on = true 
)

set new flag Id

引数:
time const pointer to the game time instance
id new flag Id
on if true, set flag for id

bool rcsc::Logger::isLogFlag ( const boost::int32_t  id  )  const [inline]

check if level is included

引数:
id checked flag Id
戻り値:
true if id is included in flags

void rcsc::Logger::open ( const char *  file_path  ) 

open file to record

引数:
file_path file path to open

bool rcsc::Logger::isOpen (  )  [inline]

check if file is opend

戻り値:
true if file is opened

void rcsc::Logger::print ( const char *  msg  ) 

put message to file directry. no flush. Do NOT use this method by yourself.

引数:
msg message

void rcsc::Logger::addText ( const boost::int32_t  id,
const char *  msg,
  ... 
)

add free message to buffer with cycle, level & message tag 'T'

引数:
id debug flag id
msg message

void rcsc::Logger::addPoint ( const boost::int32_t  id,
const double &  x,
const double &  y,
const char *  color = NULL 
)

add point info to buffer with cycle, level & message tag 'p'

引数:
x point coordinate x
y point coordinate y
color color name string

void rcsc::Logger::addPoint ( const boost::int32_t  id,
const double &  x,
const double &  y,
const char  r,
const char  g,
const char  b 
)

add point info to buffer with cycle, level & message tag 'p'

引数:
x point coordinate x
y point coordinate y
r red value
g green value
b blue value

void rcsc::Logger::addLine ( const boost::int32_t  id,
const double &  x1,
const double &  y1,
const double &  x2,
const double &  y2,
const char *  color = NULL 
)

add line info to buffer with cycle, level & message tag 'l'

引数:
x1 line start point coordinate x
y1 line start point coordinate y
x2 line end point coordinate x
y2 line end point coordinate y
color color name string

void rcsc::Logger::addLine ( const boost::int32_t  id,
const double &  x1,
const double &  y1,
const double &  x2,
const double &  y2,
const char  r,
const char  g,
const char  b 
)

add line info to buffer with cycle, level & message tag 'l'

引数:
x1 line start point coordinate x
y1 line start point coordinate y
x2 line end point coordinate x
y2 line end point coordinate y
r red value
g green value
b blue value

void rcsc::Logger::addCircle ( const boost::int32_t  id,
const double &  x,
const double &  y,
const double &  radius,
const char *  color = NULL 
)

add circle info to buffer with cycle, level & message tag 'c'

引数:
x circle center point coordinate x
y circle center point coordinate y
radius circle radius
color color name string

void rcsc::Logger::addCircle ( const boost::int32_t  id,
const double &  x,
const double &  y,
const double &  radius,
const char  r,
const char  g,
const char  b 
)

add circle info to buffer with cycle, level & message tag 'c'

引数:
x circle center point coordinate x
y circle center point coordinate y
radius circle radius
r red value
g green value
b blue value

void rcsc::Logger::addTriangle ( const boost::int32_t  id,
const double &  x1,
const double &  y1,
const double &  x2,
const double &  y2,
const double &  x3,
const double &  y3,
const char *  color = NULL 
)

add triangle info to buffer with cycle, level & message tag 't'

引数:
x1 line 1st point coordinate x
y1 line 1st point coordinate y
x2 line 2nd point coordinate x
y2 line 2nd point coordinate y
x3 line 3rd point coordinate x
y3 line 3rd point coordinate y
color color name string

void rcsc::Logger::addTriangle ( const boost::int32_t  id,
const double &  x1,
const double &  y1,
const double &  x2,
const double &  y2,
const double &  x3,
const double &  y3,
const char  r,
const char  g,
const char  b 
)

add triangle info to buffer with cycle, level & message tag 't'

引数:
x1 line 1st point coordinate x
y1 line 1st point coordinate y
x2 line 2nd point coordinate x
y2 line 2nd point coordinate y
x3 line 3rd point coordinate x
y3 line 3rd point coordinate y
r red value
g green value
b blue value

void rcsc::Logger::addRect ( const boost::int32_t  id,
const double &  left,
const double &  top,
const double &  length,
const double &  width,
const char *  color = NULL 
)

add rect info to buffer with cycle, level & message tag 'r'

引数:
left top left point coordinate x
top top left point coordinate y
length x range of the rectangle
width y range of the rectangle
color color name string

void rcsc::Logger::addRect ( const boost::int32_t  id,
const double &  left,
const double &  top,
const double &  length,
const double &  width,
const char  r,
const char  g,
const char  b 
)

add rect info to buffer with cycle, level & message tag 'r'

引数:
left top left point coordinate x
top top left point coordinate y
length x range of the rectangle
width y range of the rectangle
r red value
g green value
b blue value

void rcsc::Logger::addMessage ( const boost::int32_t  id,
const double &  x,
const double &  y,
const char *  msg,
const char *  color = NULL 
)

add message info to buffer with cycle, level & message tag 'm'

引数:
x text drawed point coordinate x
y text drawed point coordinate y
msg drawd text
color color name string

void rcsc::Logger::addMessage ( const boost::int32_t  id,
const double &  x,
const double &  y,
const char *  msg,
const char  r,
const char  g,
const char  b 
)

add message info to buffer with cycle, level & message tag 'm'

引数:
x text drawed point coordinate x
y text drawed point coordinate y
msg drawd text
r red value
g green value
b blue value


このクラスの説明は次のファイルから生成されました:
librcscに対してThu May 1 15:41:25 2008に生成されました。  doxygen 1.5.0