LIBRCSC Docs
Documentation for HELIOS's BASE LIBRCSC library for RoboCup 2D Simulation League.
All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros
logger.h
Go to the documentation of this file.
1// -*-c++-*-
2
8/*
9 *Copyright:
10
11 Copyright (C) Hidehisa AKIYAMA
12
13 This code is free software; you can redistribute it and/or
14 modify it under the terms of the GNU Lesser General Public
15 License as published by the Free Software Foundation; either
16 version 3 of the License, or (at your option) any later version.
17
18 This library is distributed in the hope that it will be useful,
19 but WITHOUT ANY WARRANTY; without even the implied warranty of
20 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
21 Lesser General Public License for more details.
22
23 You should have received a copy of the GNU Lesser General Public
24 License along with this library; if not, write to the Free Software
25 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
26
27 *EndCopyright:
28 */
29
31
32#ifndef RCSC_PLAYER_LOGGER_H
33#define RCSC_PLAYER_LOGGER_H
34
35#include <rcsc/geom/vector_2d.h>
36#include <rcsc/geom/circle_2d.h>
37#include <rcsc/geom/rect_2d.h>
38#include <rcsc/geom/sector_2d.h>
40
41#include <string>
42#include <cstdio>
43#include <cstdint>
44
45namespace rcsc {
46
47class GameTime;
48
53class Logger {
54public:
55
56 static const std::int32_t LEVEL_00 = 0x00000000;
57 static const std::int32_t LEVEL_01 = 0x00000001;
58 static const std::int32_t LEVEL_02 = 0x00000002;
59 static const std::int32_t LEVEL_03 = 0x00000004;
60 static const std::int32_t LEVEL_04 = 0x00000008;
61 static const std::int32_t LEVEL_05 = 0x00000010;
62 static const std::int32_t LEVEL_06 = 0x00000020;
63 static const std::int32_t LEVEL_07 = 0x00000040;
64 static const std::int32_t LEVEL_08 = 0x00000080;
65 static const std::int32_t LEVEL_09 = 0x00000100;
66 static const std::int32_t LEVEL_10 = 0x00000200;
67 static const std::int32_t LEVEL_11 = 0x00000400;
68 static const std::int32_t LEVEL_12 = 0x00000800;
69 static const std::int32_t LEVEL_13 = 0x00001000;
70 static const std::int32_t LEVEL_14 = 0x00002000;
71 static const std::int32_t LEVEL_15 = 0x00004000;
72 static const std::int32_t LEVEL_16 = 0x00008000;
73 static const std::int32_t LEVEL_17 = 0x00010000;
74 static const std::int32_t LEVEL_18 = 0x00020000;
75 static const std::int32_t LEVEL_19 = 0x00040000;
76 static const std::int32_t LEVEL_20 = 0x00080000;
77 static const std::int32_t LEVEL_21 = 0x00100000;
78 static const std::int32_t LEVEL_22 = 0x00200000;
79 static const std::int32_t LEVEL_23 = 0x00400000;
80 static const std::int32_t LEVEL_24 = 0x00800000;
81 static const std::int32_t LEVEL_25 = 0x01000000;
82 static const std::int32_t LEVEL_26 = 0x02000000;
83 static const std::int32_t LEVEL_27 = 0x04000000;
84 static const std::int32_t LEVEL_28 = 0x08000000;
85 static const std::int32_t LEVEL_29 = 0x10000000;
86 static const std::int32_t LEVEL_30 = 0x20000000;
87 static const std::int32_t LEVEL_31 = 0x40000000;
88 static const std::int32_t LEVEL_32 = 0x80000000;
89
90 /*************************************************
91 Log Message Line Format:
92 Line := <Time> <Level> <Type> <Content>
93 Time := integer value
94 Level := integer value
95 Type := M | p | l | a | c | C | t | T | r | R | s | m
96 M : log message for text viewer
97 p : point
98 l: line
99 a: arc
100 c: circle
101 C: filled circle
102 t: triangle
103 T: filled triangle
104 r: rectangle
105 R: filled rectangle
106 s: sector
107 S: filled sector
108 m: message painted on the field
109 Text := <Str>
110 Point := <x:Real> <y:Real>[ <Color>]
111 Line := <x1:Real> <y1:Real> <x2:Real> <y2:Real>[ <Color>]
112 Arc := <x:Real> <y:Real> <r:Real> <startAngle:Real> <spanAngle:Real>[ <Color>]
113 Circle := <x:Real> <y:Real> <r:Real>[ <Color>]
114 Triangle := <x1:Real> <y1:Real> <x2:Real> <y2:Real> <x3:Real> <y3:Real>[ <Color>]
115 Rectangle := <leftX:Real> <topY:Real> <width:Real> <height:Real>[ <Color>]
116 Sector := <x:Real> <y:Real> <minR:Real> <maxR:Real> <startAngle:Real> <spanAngle:Real>[ <Color>]
117 Message := <x:Real> <y:Real>[ (c <Color>)] <Str>
118 **************************************************/
119
120 static const std::int32_t SYSTEM = LEVEL_01;
121 static const std::int32_t SENSOR = LEVEL_02;
122 static const std::int32_t WORLD = LEVEL_03;
123 static const std::int32_t ACTION = LEVEL_04;
124 static const std::int32_t INTERCEPT = LEVEL_05;
125 static const std::int32_t KICK = LEVEL_06;
126 static const std::int32_t HOLD = LEVEL_07;
127 static const std::int32_t DRIBBLE = LEVEL_08;
128 static const std::int32_t PASS = LEVEL_09;
129 static const std::int32_t CROSS = LEVEL_10;
130 static const std::int32_t SHOOT = LEVEL_11;
131 static const std::int32_t CLEAR = LEVEL_12;
132 static const std::int32_t BLOCK = LEVEL_13;
133 static const std::int32_t MARK = LEVEL_14;
134 static const std::int32_t POSITIONING = LEVEL_15;
135 static const std::int32_t ROLE = LEVEL_16;
136 static const std::int32_t TEAM = LEVEL_17;
137 static const std::int32_t COMMUNICATION = LEVEL_18;
138 static const std::int32_t ANALYZER = LEVEL_19;
139 static const std::int32_t ACT_SEQ = LEVEL_20;
140 static const std::int32_t ACTION_CHAIN = ACT_SEQ;
141 static const std::int32_t PLAN = LEVEL_21;
142
143 static const std::int32_t TRAINING = LEVEL_32;
144
145 static const std::int32_t LEVEL_ANY = 0xffffffff;
146
147private:
148
150 const GameTime * M_time;
151
153 FILE * M_fout;
154
156 std::int32_t M_flags;
157
158 int M_start_time;
159 int M_end_time;
160
161public:
166
171
178 void setLogFlag( const GameTime * time,
179 const std::int32_t level,
180 const bool on = true );
181
187 void setTimeRange( const int start_time,
188 const int end_time );
189
195 bool isEnabled( const std::int32_t level ) const
196 {
197 return ( level & M_flags );
198 }
199
204 void open( const std::string & filepath );
205
210
215
219 void close();
220
225 bool isOpen()
226 {
227 return ( M_fout != NULL );
228 }
229
233 void flush();
234
238 void clear();
239
245 void addText( const std::int32_t level,
246 const char * msg,
247 ... );
248
256 void addPoint( const std::int32_t level,
257 const double x,
258 const double y,
259 const char * color = NULL );
260
267 void addPoint( const std::int32_t level,
268 const Vector2D & pos,
269 const char * color = NULL )
270 {
271 addPoint( level, pos.x, pos.y, color );
272 }
273
283 void addPoint( const std::int32_t level,
284 const double x,
285 const double y,
286 const int r, const int g, const int b );
287
296 void addPoint( const std::int32_t level,
297 const Vector2D & pos,
298 const int r, const int g, const int b )
299 {
300 addPoint( level, pos.x, pos.y, r, g, b );
301 }
302
312 void addLine( const std::int32_t level,
313 const double x1,
314 const double y1,
315 const double x2,
316 const double y2,
317 const char * color = NULL );
318
326 void addLine( const std::int32_t level,
327 const Vector2D & start,
328 const Vector2D & end,
329 const char * color = NULL )
330 {
331 addLine( level, start.x, start.y, end.x, end.y, color );
332 }
333
345 void addLine( const std::int32_t level,
346 const double x1,
347 const double y1,
348 const double x2,
349 const double y2,
350 const int r, const int g, const int b );
351
361 void addLine( const std::int32_t level,
362 const Vector2D & start,
363 const Vector2D & end,
364 const int r, const int g, const int b )
365 {
366 addLine( level, start.x, start.y, end.x, end.y, r, g, b );
367 }
368
379 void addArc( const std::int32_t level,
380 const double x,
381 const double y,
382 const double radius,
383 const AngleDeg & start_angle,
384 const double span_angle,
385 const char * color = NULL );
386
396 void addArc( const std::int32_t level,
397 const Vector2D & center,
398 const double radius,
399 const AngleDeg & start_angle,
400 const double span_angle,
401 const char * color = NULL )
402 {
403 addArc( level, center.x, center.y, radius, start_angle, span_angle, color );
404 }
405
418 void addArc( const std::int32_t level,
419 const double x,
420 const double y,
421 const double radius,
422 const AngleDeg & start_angle,
423 const double span_angle,
424 const int r, const int g, const int b );
425
437 void addArc( const std::int32_t level,
438 const Vector2D & center,
439 const double radius,
440 const AngleDeg & start_angle,
441 const double span_angle,
442 const int r, const int g, const int b )
443 {
444 addArc( level, center.x, center.y, radius, start_angle, span_angle, r, g, b );
445 }
446
456 void addCircle( const std::int32_t level,
457 const double x,
458 const double y,
459 const double radius,
460 const char * color = NULL,
461 const bool fill = false );
462
471 void addCircle( const std::int32_t level,
472 const Vector2D & center,
473 const double radius,
474 const char * color = NULL,
475 const bool fill = false )
476 {
477 addCircle( level, center.x, center.y, radius, color, fill );
478 }
479
487 void addCircle( const std::int32_t level,
488 const Circle2D & circle,
489 const char * color = NULL,
490 const bool fill = false )
491 {
492 addCircle( level, circle.center().x, circle.center().y, circle.radius(), color, fill );
493 }
494
506 void addCircle( const std::int32_t level,
507 const double x,
508 const double y,
509 const double radius,
510 const int r, const int g, const int b,
511 const bool fill = false );
512
523 void addCircle( const std::int32_t level,
524 const Vector2D & center,
525 const double radius,
526 const int r, const int g, const int b,
527 const bool fill = false )
528 {
529 addCircle( level, center.x, center.y, radius, r, g, b, fill );
530 }
531
541 void addCircle( const std::int32_t level,
542 const Circle2D & circle,
543 const int r, const int g, const int b,
544 const bool fill = false )
545 {
546 addCircle( level,
547 circle.center().x, circle.center().y, circle.radius(),
548 r, g, b,
549 fill );
550 }
551
564 void addTriangle( const std::int32_t level,
565 const double x1,
566 const double y1,
567 const double x2,
568 const double y2,
569 const double x3,
570 const double y3,
571 const char * color = NULL,
572 const bool fill = false );
573
583 void addTriangle( const std::int32_t level,
584 const Vector2D & p1,
585 const Vector2D & p2,
586 const Vector2D & p3,
587 const char * color = NULL,
588 const bool fill = false )
589 {
590 addTriangle( level,
591 p1.x, p1.y,
592 p2.x, p2.y,
593 p3.x, p3.y,
594 color,
595 fill );
596 }
597
605 void addTriangle( const std::int32_t level,
606 const Triangle2D & tri,
607 const char * color = NULL,
608 const bool fill = false )
609 {
610 addTriangle( level,
611 tri.a().x, tri.a().y,
612 tri.b().x, tri.b().y,
613 tri.c().x, tri.c().y,
614 color,
615 fill );
616 }
617
632 void addTriangle( const std::int32_t level,
633 const double x1,
634 const double y1,
635 const double x2,
636 const double y2,
637 const double x3,
638 const double y3,
639 const int r, const int g, const int b,
640 const bool fill = false );
641
653 void addTriangle( const std::int32_t level,
654 const Vector2D & p1,
655 const Vector2D & p2,
656 const Vector2D & p3,
657 const int r, const int g, const int b,
658 const bool fill = false )
659 {
660 addTriangle( level,
661 p1.x, p1.y,
662 p2.x, p2.y,
663 p3.x, p3.y,
664 r, g, b,
665 fill );
666 }
667
677 void addTriangle( const std::int32_t level,
678 const Triangle2D & tri,
679 const int r, const int g, const int b,
680 const bool fill = false )
681 {
682 addTriangle( level,
683 tri.a().x, tri.a().y,
684 tri.b().x, tri.b().y,
685 tri.c().x, tri.c().y,
686 r, g, b,
687 fill );
688 }
689
700 void addRect( const std::int32_t level,
701 const double left,
702 const double top,
703 const double length,
704 const double width,
705 const char * color = NULL,
706 const bool fill = false );
707
715 void addRect( const std::int32_t level,
716 const Rect2D & rect,
717 const char * color = NULL,
718 const bool fill = false )
719 {
720 addRect( level,
721 rect.left(), rect.top(),
722 rect.size().length(), rect.size().width(),
723 color,
724 fill );
725 }
726
739 void addRect( const std::int32_t level,
740 const double left,
741 const double top,
742 const double length,
743 const double width,
744 const int r, const int g, const int b,
745 const bool fill = false );
746
756 void addRect( const std::int32_t level,
757 const Rect2D & rect,
758 const int r, const int g, const int b,
759 const bool fill = false )
760 {
761 addRect( level,
762 rect.left(), rect.top(),
763 rect.size().length(), rect.size().width(),
764 r, g, b,
765 fill );
766 }
767
780 void addSector( const std::int32_t level,
781 const double x,
782 const double y,
783 const double min_radius,
784 const double max_radius,
785 const AngleDeg & start_angle,
786 const double span_angle,
787 const char * color = NULL,
788 const bool fill = false );
789
801 void addSector( const std::int32_t level,
802 const Vector2D & center,
803 const double min_radius,
804 const double max_radius,
805 const AngleDeg & start_angle,
806 const double span_angle,
807 const char * color = NULL,
808 const bool fill = false )
809 {
810 addSector( level,
811 center.x, center.y, min_radius, max_radius,
812 start_angle, span_angle,
813 color,
814 fill );
815 }
816
831 void addSector( const std::int32_t level,
832 const double x,
833 const double y,
834 const double min_radius,
835 const double max_radius,
836 const AngleDeg & start_angle,
837 const double span_angle,
838 const int r, const int g, const int b,
839 const bool fill = false );
840
854 void addSector( const std::int32_t level,
855 const Vector2D & center,
856 const double min_radius,
857 const double max_radius,
858 const AngleDeg & start_angle,
859 const double span_angle,
860 const int r, const int g, const int b,
861 const bool fill = false )
862 {
863 addSector( level,
864 center.x, center.y, min_radius, max_radius,
865 start_angle, span_angle,
866 r, g, b,
867 fill );
868 }
869
877 void addSector( const std::int32_t level,
878 const Sector2D & sector,
879 const char * color = NULL,
880 const bool fill = false );
881
891 void addSector( const std::int32_t level,
892 const Sector2D & sector,
893 const int r, const int g, const int b,
894 const bool fill = false );
895
904 void addMessage( const std::int32_t level,
905 const double x,
906 const double y,
907 const char * msg,
908 const char * color = NULL );
909
917 void addMessage( const std::int32_t level,
918 const Vector2D & pos,
919 const char * msg,
920 const char * color = NULL )
921 {
922 addMessage( level,
923 pos.x, pos.y, msg,
924 color );
925 }
926
937 void addMessage( const std::int32_t level,
938 const double x,
939 const double y,
940 const char * msg,
941 const int r, const int g, const int b );
942
952 void addMessage( const std::int32_t level,
953 const Vector2D & pos,
954 const char * msg,
955 const int r, const int g, const int b )
956 {
957 addMessage( level,
958 pos.x, pos.y, msg,
959 r, g, b );
960 }
961
962};
963
965extern Logger dlog;
966
967}
968
969#endif
2D circle region Header File.
degree wrapper class
Definition: angle_deg.h:45
2d circle class
Definition: circle_2d.h:51
const Vector2D & center() const
get the center point
Definition: circle_2d.h:135
double radius() const
get the radius value
Definition: circle_2d.h:144
game time object
Definition: game_time.h:43
log output manager
Definition: logger.h:53
void addCircle(const std::int32_t level, const Vector2D &center, const double radius, const int r, const int g, const int b, const bool fill=false)
add circle info to buffer with cycle, level & message tag 'c'
Definition: logger.h:523
void addPoint(const std::int32_t level, const Vector2D &pos, const char *color=NULL)
add point info to buffer with cycle, level & message tag 'p'
Definition: logger.h:267
void addRect(const std::int32_t level, const double left, const double top, const double length, const double width, const int r, const int g, const int b, const bool fill=false)
add rect info to buffer with cycle, level & message tag 'r'
void addLine(const std::int32_t level, const double x1, const double y1, const double x2, const double y2, const int r, const int g, const int b)
add line info to buffer with cycle, level & message tag 'l'
static const std::int32_t POSITIONING
log level definition alias
Definition: logger.h:134
static const std::int32_t LEVEL_26
log level definition variable
Definition: logger.h:82
void addMessage(const std::int32_t level, const double x, const double y, const char *msg, const char *color=NULL)
add message info to buffer with cycle, level & message tag 'm'
static const std::int32_t WORLD
log level definition alias
Definition: logger.h:122
void addSector(const std::int32_t level, const Vector2D &center, const double min_radius, const double max_radius, const AngleDeg &start_angle, const double span_angle, const char *color=NULL, const bool fill=false)
add arc info to the buffer. message tag 'a'
Definition: logger.h:801
void addText(const std::int32_t level, const char *msg,...)
add free message to buffer with cycle, level & message tag 'T'
void addTriangle(const std::int32_t level, const Vector2D &p1, const Vector2D &p2, const Vector2D &p3, const int r, const int g, const int b, const bool fill=false)
add triangle info to buffer with cycle, level & message tag 't'
Definition: logger.h:653
void addSector(const std::int32_t level, const double x, const double y, const double min_radius, const double max_radius, const AngleDeg &start_angle, const double span_angle, const int r, const int g, const int b, const bool fill=false)
add arc info to the buffer. message tag 'a'
bool isOpen()
check if file is opened
Definition: logger.h:225
static const std::int32_t LEVEL_28
log level definition variable
Definition: logger.h:84
static const std::int32_t ACTION_CHAIN
log level definition alias
Definition: logger.h:140
static const std::int32_t SHOOT
log level definition alias
Definition: logger.h:130
void addArc(const std::int32_t level, const Vector2D &center, const double radius, const AngleDeg &start_angle, const double span_angle, const int r, const int g, const int b)
add arc info to the buffer. message tag 'a'
Definition: logger.h:437
void openStandardOutput()
use standard output to record
static const std::int32_t LEVEL_11
log level definition variable
Definition: logger.h:67
static const std::int32_t HOLD
log level definition alias
Definition: logger.h:126
void addLine(const std::int32_t level, const Vector2D &start, const Vector2D &end, const char *color=NULL)
add line info to buffer with cycle, level & message tag 'l'
Definition: logger.h:326
static const std::int32_t LEVEL_05
log level definition variable
Definition: logger.h:61
static const std::int32_t LEVEL_23
log level definition variable
Definition: logger.h:79
void addCircle(const std::int32_t level, const double x, const double y, const double radius, const int r, const int g, const int b, const bool fill=false)
add circle info to buffer with cycle, level & message tag 'c'
static const std::int32_t LEVEL_19
log level definition variable
Definition: logger.h:75
void addSector(const std::int32_t level, const Sector2D &sector, const char *color=NULL, const bool fill=false)
add arc info to the buffer. message tag 'a'
static const std::int32_t CROSS
log level definition alias
Definition: logger.h:129
void addRect(const std::int32_t level, const Rect2D &rect, const char *color=NULL, const bool fill=false)
add rect info to buffer with cycle, level & message tag 'r'
Definition: logger.h:715
static const std::int32_t SYSTEM
log level definition alias
Definition: logger.h:120
void addTriangle(const std::int32_t level, const Triangle2D &tri, const char *color=NULL, const bool fill=false)
add triangle info to buffer with cycle, level & message tag 't'
Definition: logger.h:605
bool isEnabled(const std::int32_t level) const
check if the level is enabled
Definition: logger.h:195
void addMessage(const std::int32_t level, const Vector2D &pos, const char *msg, const int r, const int g, const int b)
add message info to buffer with cycle, level & message tag 'm'
Definition: logger.h:952
void addLine(const std::int32_t level, const Vector2D &start, const Vector2D &end, const int r, const int g, const int b)
add line info to buffer with cycle, level & message tag 'l'
Definition: logger.h:361
static const std::int32_t ANALYZER
log level definition alias
Definition: logger.h:138
void addCircle(const std::int32_t level, const Circle2D &circle, const char *color=NULL, const bool fill=false)
add circle info to buffer with cycle, level & message tag 'c'
Definition: logger.h:487
void addCircle(const std::int32_t level, const Circle2D &circle, const int r, const int g, const int b, const bool fill=false)
add circle info to buffer with cycle, level & message tag 'c'
Definition: logger.h:541
void addLine(const std::int32_t level, 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 clear()
clear buffer without flush
void setTimeRange(const int start_time, const int end_time)
set the range of the recorded game time
static const std::int32_t LEVEL_10
log level definition variable
Definition: logger.h:66
static const std::int32_t LEVEL_31
log level definition variable
Definition: logger.h:87
static const std::int32_t ACTION
log level definition alias
Definition: logger.h:123
static const std::int32_t LEVEL_24
log level definition variable
Definition: logger.h:80
static const std::int32_t LEVEL_18
log level definition variable
Definition: logger.h:74
void addSector(const std::int32_t level, const Sector2D &sector, const int r, const int g, const int b, const bool fill=false)
add arc info to the buffer. message tag 'a'
void addTriangle(const std::int32_t level, const Triangle2D &tri, const int r, const int g, const int b, const bool fill=false)
add triangle info to buffer with cycle, level & message tag 't'
Definition: logger.h:677
static const std::int32_t LEVEL_06
log level definition variable
Definition: logger.h:62
static const std::int32_t COMMUNICATION
log level definition alias
Definition: logger.h:137
static const std::int32_t LEVEL_15
log level definition variable
Definition: logger.h:71
static const std::int32_t LEVEL_02
log level definition variable
Definition: logger.h:58
static const std::int32_t MARK
log level definition alias
Definition: logger.h:133
static const std::int32_t ACT_SEQ
log level definition alias
Definition: logger.h:139
void close()
close file if opened
static const std::int32_t LEVEL_07
log level definition variable
Definition: logger.h:63
~Logger()
if file is opened, flush buffer and close file.
void addTriangle(const std::int32_t level, const double x1, const double y1, const double x2, const double y2, const double x3, const double y3, const char *color=NULL, const bool fill=false)
add triangle info to buffer with cycle, level & message tag 't'
void addArc(const std::int32_t level, const double x, const double y, const double radius, const AngleDeg &start_angle, const double span_angle, const int r, const int g, const int b)
add arc info to the buffer. message tag 'a'
static const std::int32_t LEVEL_25
log level definition variable
Definition: logger.h:81
static const std::int32_t LEVEL_21
log level definition variable
Definition: logger.h:77
static const std::int32_t LEVEL_27
log level definition variable
Definition: logger.h:83
void addTriangle(const std::int32_t level, const Vector2D &p1, const Vector2D &p2, const Vector2D &p3, const char *color=NULL, const bool fill=false)
add triangle info to buffer with cycle, level & message tag 't'
Definition: logger.h:583
static const std::int32_t PASS
log level definition alias
Definition: logger.h:128
static const std::int32_t LEVEL_00
log level definition variable
Definition: logger.h:56
static const std::int32_t LEVEL_01
log level definition variable
Definition: logger.h:57
void addMessage(const std::int32_t level, const double x, const double y, const char *msg, const int r, const int g, const int b)
add message info to buffer with cycle, level & message tag 'm'
void addArc(const std::int32_t level, const double x, const double y, const double radius, const AngleDeg &start_angle, const double span_angle, const char *color=NULL)
add arc info to the buffer. message tag 'a'
void addPoint(const std::int32_t level, const double x, const double y, const char *color=NULL)
add point info to buffer with cycle, level & message tag 'p'
static const std::int32_t LEVEL_12
log level definition variable
Definition: logger.h:68
void addMessage(const std::int32_t level, const Vector2D &pos, const char *msg, const char *color=NULL)
add message info to buffer with cycle, level & message tag 'm'
Definition: logger.h:917
void addTriangle(const std::int32_t level, const double x1, const double y1, const double x2, const double y2, const double x3, const double y3, const int r, const int g, const int b, const bool fill=false)
add triangle info to buffer with cycle, level & message tag 't'
static const std::int32_t LEVEL_16
log level definition variable
Definition: logger.h:72
void addCircle(const std::int32_t level, const Vector2D &center, const double radius, const char *color=NULL, const bool fill=false)
add circle info to buffer with cycle, level & message tag 'c'
Definition: logger.h:471
static const std::int32_t KICK
log level definition alias
Definition: logger.h:125
static const std::int32_t LEVEL_03
log level definition variable
Definition: logger.h:59
static const std::int32_t LEVEL_29
log level definition variable
Definition: logger.h:85
void setLogFlag(const GameTime *time, const std::int32_t level, const bool on=true)
set new log level
static const std::int32_t BLOCK
log level definition alias
Definition: logger.h:132
static const std::int32_t LEVEL_14
log level definition variable
Definition: logger.h:70
void openStandardError()
use standard error to record
static const std::int32_t LEVEL_32
log level definition variable
Definition: logger.h:88
static const std::int32_t CLEAR
log level definition alias
Definition: logger.h:131
void addPoint(const std::int32_t level, const double x, const double y, const int r, const int g, const int b)
add point info to buffer with cycle, level & message tag 'p'
static const std::int32_t LEVEL_ANY
log level definition variable
Definition: logger.h:145
void addCircle(const std::int32_t level, const double x, const double y, const double radius, const char *color=NULL, const bool fill=false)
add circle info to buffer with cycle, level & message tag 'c'
static const std::int32_t INTERCEPT
log level definition alias
Definition: logger.h:124
static const std::int32_t TEAM
log level definition alias
Definition: logger.h:136
void addRect(const std::int32_t level, const Rect2D &rect, const int r, const int g, const int b, const bool fill=false)
add rect info to buffer with cycle, level & message tag 'r'
Definition: logger.h:756
static const std::int32_t LEVEL_04
log level definition variable
Definition: logger.h:60
static const std::int32_t LEVEL_30
log level definition variable
Definition: logger.h:86
static const std::int32_t TRAINING
log level definition alias
Definition: logger.h:143
static const std::int32_t LEVEL_17
log level definition variable
Definition: logger.h:73
static const std::int32_t PLAN
log level definition alias
Definition: logger.h:141
static const std::int32_t LEVEL_20
log level definition variable
Definition: logger.h:76
void addPoint(const std::int32_t level, const Vector2D &pos, const int r, const int g, const int b)
add point info to buffer with cycle, level & message tag 'p'
Definition: logger.h:296
static const std::int32_t ROLE
log level definition alias
Definition: logger.h:135
void flush()
flush stored message
void addSector(const std::int32_t level, const Vector2D &center, const double min_radius, const double max_radius, const AngleDeg &start_angle, const double span_angle, const int r, const int g, const int b, const bool fill=false)
add arc info to the buffer. message tag 'a'
Definition: logger.h:854
void addSector(const std::int32_t level, const double x, const double y, const double min_radius, const double max_radius, const AngleDeg &start_angle, const double span_angle, const char *color=NULL, const bool fill=false)
add arc info to the buffer. message tag 'a'
static const std::int32_t LEVEL_13
log level definition variable
Definition: logger.h:69
static const std::int32_t SENSOR
log level definition alias
Definition: logger.h:121
static const std::int32_t LEVEL_09
log level definition variable
Definition: logger.h:65
void addArc(const std::int32_t level, const Vector2D &center, const double radius, const AngleDeg &start_angle, const double span_angle, const char *color=NULL)
add arc info to the buffer. message tag 'a'
Definition: logger.h:396
void addRect(const std::int32_t level, const double left, const double top, const double length, const double width, const char *color=NULL, const bool fill=false)
add rect info to buffer with cycle, level & message tag 'r'
void open(const std::string &filepath)
open file to record
static const std::int32_t LEVEL_22
log level definition variable
Definition: logger.h:78
static const std::int32_t DRIBBLE
log level definition alias
Definition: logger.h:127
Logger()
allocate message buffer memory
static const std::int32_t LEVEL_08
log level definition variable
Definition: logger.h:64
2D rectangle regin class.
Definition: rect_2d.h:59
double left() const
get the left x coordinate of this rectangle.
Definition: rect_2d.h:602
const Size2D & size() const
get the XY range of this rectangle
Definition: rect_2d.h:674
double top() const
get the top y coordinate of this rectangle.
Definition: rect_2d.h:620
2D sector region(OUGI-GATA) class
Definition: sector_2d.h:45
double length() const
get the value of X range
Definition: size_2d.h:113
double width() const
get the value of Y range
Definition: size_2d.h:122
2D triangle class
Definition: triangle_2d.h:49
const Vector2D & b() const
get 2nd point
Definition: triangle_2d.h:143
const Vector2D & c() const
get 3rd point
Definition: triangle_2d.h:152
const Vector2D & a() const
get 1st point
Definition: triangle_2d.h:134
2D point vector class
Definition: vector_2d.h:46
double y
Y coordinate.
Definition: vector_2d.h:64
double x
X coordinate.
Definition: vector_2d.h:63
2D rectangle region Header File.
2D sector region Header File.
2D triangle class Header File.
2d vector class Header File.