g4tools  5.4.0
Public Member Functions | Static Public Member Functions | Static Protected Member Functions | Protected Attributes | List of all members
tools::sg::style_parser Class Reference
Collaboration diagram for tools::sg::style_parser:
Collaboration graph
[legend]

Public Member Functions

 style_parser ()
 
virtual ~style_parser ()
 
 style_parser (const style_parser &a_from)
 
style_parseroperator= (const style_parser &a_from)
 
void copy (const style_parser &a_from)
 
bool equal (const style_parser &a_from)
 
virtual void reset ()
 
std::string tos () const
 
void color (const colorf &a_v)
 
colorf color () const
 
void highlight_color (const colorf &a_v)
 
colorf highlight_color () const
 
void back_color (const colorf &a_v)
 
colorf back_color () const
 
void width (float a_v)
 
float width () const
 
void line_width (float a_v)
 
float line_width () const
 
float back_shadow () const
 
void back_shadow (float a_v)
 
void marker_style (sg::marker_style a_v)
 
sg::marker_style marker_style () const
 
void marker_size (float a_v)
 
float marker_size () const
 
void point_size (float a_v)
 
float point_size () const
 
void font_size (float a_v)
 
float font_size () const
 
void font_modeling (sg::font_modeling a_v)
 
sg::font_modeling font_modeling () const
 
void area_style (sg::area_style a_v)
 
sg::area_style area_style () const
 
void modeling (const std::string &a_v)
 
const std::string & modeling () const
 
void light_model (const std::string &a_v)
 
const std::string & light_model () const
 
void tick_modeling (const std::string &a_v)
 
const std::string & tick_modeling () const
 
void encoding (const std::string &a_v)
 
const std::string & encoding () const
 
void smoothing (bool a_v)
 
bool smoothing () const
 
void hinting (bool a_v)
 
bool hinting () const
 
sg::painting_policy painting () const
 
void painting (sg::painting_policy a_v)
 
sg::hatching_policy hatching () const
 
void hatching (sg::hatching_policy a_v)
 
sg::projection_type projection () const
 
void projection (sg::projection_type a_v)
 
void pattern (lpat a_v)
 
lpat pattern () const
 
void line_pattern (lpat a_v)
 
lpat line_pattern () const
 
void font (const std::string &a_v)
 
const std::string & font () const
 
void divisions (int a_v)
 
int divisions () const
 
void rotation_steps (unsigned int a_v)
 
unsigned int rotation_steps () const
 
void offset (float a_v)
 
float offset () const
 
void strip_width (float a_v)
 
float strip_width () const
 
void angle (float a_v)
 
float angle () const
 
void scale (float a_v)
 
float scale () const
 
void bar_offset (float a_v)
 
float bar_offset () const
 
void bar_width (float a_v)
 
float bar_width () const
 
void multi_node_limit (int a_v)
 
int multi_node_limit () const
 
void spacing (float a_v)
 
float spacing () const
 
void visible (bool a_v)
 
bool visible () const
 
void editable (bool a_v)
 
bool editable () const
 
void automated (bool a_v)
 
bool automated () const
 
void cut (const std::string &a_v)
 
const std::string & cut () const
 
void options (const std::string &a_v)
 
const std::string & options () const
 
void color_mapping (const std::string &a_v)
 
const std::string & color_mapping () const
 
void enforced (bool a_v)
 
bool enforced () const
 
void translation (const vec3f &a_v)
 
vec3f translation () const
 
void front_face (winding_type a_v)
 
winding_type front_face () const
 
void hjust (sg::hjust a_v)
 
sg::hjust hjust () const
 
void vjust (sg::vjust a_v)
 
sg::vjust vjust () const
 
void coloring (const std::string &a_v)
 
const std::string & coloring () const
 
void title (const std::string &a_v)
 
const std::string & title () const
 
void pickable (bool a_v)
 
bool pickable () const
 
bool parse (std::ostream &a_out, const cmaps_t &a_cmaps, const std::string &a_s)
 

Static Public Member Functions

static int no_limit ()
 

Static Protected Member Functions

static bool check_2 (size_t a_n, const std::string &a_s, const std::string &a_line, std::ostream &a_out)
 
static bool check_bool (const std::string &a_w, const std::string &a_s, std::ostream &a_out, bool &a_v)
 
static bool check_int (const std::string &a_w, const std::string &a_s, std::ostream &a_out, int &a_v)
 
static bool check_uint (const std::string &a_w, const std::string &a_s, std::ostream &a_out, unsigned int &a_v)
 
static bool check_float (const std::string &a_w, const std::string &a_s, std::ostream &a_out, float &a_v)
 

Protected Attributes

colorf m_color
 
colorf m_highlight_color
 
colorf m_back_color
 
float m_width
 
float m_line_width
 
float m_marker_size
 
float m_point_size
 
float m_font_size
 
sg::font_modeling m_font_modeling
 
lpat m_pattern
 
lpat m_line_pattern
 
sg::marker_style m_marker_style
 
sg::area_style m_area_style
 
std::string m_modeling
 
std::string m_light_model
 
std::string m_tick_modeling
 
std::string m_encoding
 
bool m_smoothing
 
bool m_hinting
 
std::string m_cut
 
sg::painting_policy m_painting
 
sg::hatching_policy m_hatching
 
sg::projection_type m_projection
 
std::string m_font
 
int m_multi_node_limit
 
int m_divisions
 
unsigned int m_rotation_steps
 
float m_back_shadow
 
float m_spacing
 
float m_angle
 
float m_scale
 
float m_offset
 
float m_strip_width
 
bool m_visible
 
float m_bar_offset
 
float m_bar_width
 
bool m_editable
 
bool m_automated
 
std::string m_options
 
std::string m_color_mapping
 
bool m_enforced
 
vec3f m_translation
 
winding_type m_front_face
 
sg::hjust m_hjust
 
sg::vjust m_vjust
 
std::string m_coloring
 
std::string m_title
 
bool m_pickable
 

Detailed Description

Definition at line 20 of file style_parser.

Constructor & Destructor Documentation

◆ style_parser() [1/2]

tools::sg::style_parser::style_parser ( )
inline

Definition at line 25 of file style_parser.

26  :m_color(0,0,0)
27  ,m_highlight_color(0,0,0)
28  ,m_back_color(1,1,1)
29  ,m_width(1)
30  ,m_line_width(1)
31  ,m_marker_size(1)
32  ,m_point_size(1)
33  ,m_font_size(10)
43  ,m_smoothing(false)
44  ,m_hinting(false)
45  ,m_cut()
49  ,m_font("default")
51  ,m_divisions(510) //Same as CERN-ROOT/TAttAxis
52  ,m_rotation_steps(24) //Same as SbPolyhedron default.
53  ,m_back_shadow(0)
54  ,m_spacing(0.05F)
55  ,m_angle(fpi()/4.0F)
56  ,m_scale(1)
57  ,m_offset(0)
58  ,m_strip_width(0)
59  ,m_visible(true)
60  ,m_bar_offset(0.25F)
61  ,m_bar_width(0.5F)
62  ,m_editable(false)
63  ,m_automated(true)
64  ,m_options()
66  ,m_enforced(false)
67  ,m_translation(0,0,0)
69  ,m_hjust(left)
70  ,m_vjust(bottom)
71  ,m_coloring()
72  ,m_title()
73  ,m_pickable(false)
74  {
75 #ifdef TOOLS_MEM
76  mem::increment(s_class().c_str());
77 #endif
78  }

◆ ~style_parser()

virtual tools::sg::style_parser::~style_parser ( )
inlinevirtual

Definition at line 80 of file style_parser.

80  {
81 #ifdef TOOLS_MEM
82  mem::decrement(s_class().c_str());
83 #endif
84  }

◆ style_parser() [2/2]

tools::sg::style_parser::style_parser ( const style_parser a_from)
inline

Definition at line 86 of file style_parser.

87  :m_color(a_from.m_color)
88  ,m_highlight_color(a_from.m_highlight_color)
89  ,m_back_color(a_from.m_back_color)
90  ,m_width(a_from.m_width)
91  ,m_line_width(a_from.m_line_width)
92  ,m_marker_size(a_from.m_marker_size)
93  ,m_point_size(a_from.m_point_size)
94  ,m_font_size(a_from.m_font_size)
95  ,m_font_modeling(a_from.m_font_modeling)
96  ,m_pattern(a_from.m_pattern)
97  ,m_line_pattern(a_from.m_line_pattern)
98  ,m_marker_style(a_from.m_marker_style)
99  ,m_area_style(a_from.m_area_style)
100  ,m_modeling (a_from.m_modeling )
101  ,m_light_model(a_from.m_light_model)
102  ,m_tick_modeling(a_from.m_tick_modeling)
103  ,m_encoding(a_from.m_encoding)
104  ,m_smoothing(a_from.m_smoothing)
105  ,m_hinting(a_from.m_hinting)
106  ,m_cut(a_from.m_cut)
107  ,m_painting(a_from.m_painting)
108  ,m_hatching(a_from.m_hatching)
109  ,m_projection(a_from.m_projection)
110  ,m_font(a_from.m_font)
111  ,m_multi_node_limit(a_from.m_multi_node_limit)
112  ,m_divisions(a_from.m_divisions)
113  ,m_rotation_steps(a_from.m_rotation_steps)
114  ,m_back_shadow(a_from.m_back_shadow)
115  ,m_spacing(a_from.m_spacing)
116  ,m_angle(a_from.m_angle)
117  ,m_scale(a_from.m_scale)
118  ,m_offset(a_from.m_offset)
119  ,m_strip_width(a_from.m_strip_width)
120  ,m_visible(a_from.m_visible)
121  ,m_bar_offset(a_from.m_bar_offset)
122  ,m_bar_width(a_from.m_bar_width)
123  ,m_editable(a_from.m_editable)
124  ,m_automated(a_from.m_automated)
125  ,m_options(a_from.m_options)
126  ,m_color_mapping(a_from.m_color_mapping)
127  ,m_enforced(a_from.m_enforced)
128  ,m_translation(a_from.m_translation)
129  ,m_front_face(a_from.m_front_face)
130  ,m_hjust(a_from.m_hjust)
131  ,m_vjust(a_from.m_vjust)
132  ,m_coloring(a_from.m_coloring)
133  ,m_title(a_from.m_title)
134  ,m_pickable(a_from.m_pickable)
135  {
136 #ifdef TOOLS_MEM
137  mem::increment(s_class().c_str());
138 #endif
139  }

Member Function Documentation

◆ angle() [1/2]

float tools::sg::style_parser::angle ( ) const
inline

Definition at line 564 of file style_parser.

564 {return m_angle;}

◆ angle() [2/2]

void tools::sg::style_parser::angle ( float  a_v)
inline

Definition at line 563 of file style_parser.

563 {m_angle = a_v;}

◆ area_style() [1/2]

sg::area_style tools::sg::style_parser::area_style ( ) const
inline

Definition at line 513 of file style_parser.

513 {return m_area_style;}

◆ area_style() [2/2]

void tools::sg::style_parser::area_style ( sg::area_style  a_v)
inline

Definition at line 512 of file style_parser.

512 {m_area_style = a_v;}

◆ automated() [1/2]

bool tools::sg::style_parser::automated ( ) const
inline

Definition at line 588 of file style_parser.

588 {return m_automated;}

◆ automated() [2/2]

void tools::sg::style_parser::automated ( bool  a_v)
inline

Definition at line 587 of file style_parser.

587 {m_automated = a_v;}

◆ back_color() [1/2]

colorf tools::sg::style_parser::back_color ( ) const
inline

Definition at line 486 of file style_parser.

486 {return m_back_color;}

◆ back_color() [2/2]

void tools::sg::style_parser::back_color ( const colorf a_v)
inline

Definition at line 485 of file style_parser.

485 {m_back_color = a_v;}

◆ back_shadow() [1/2]

float tools::sg::style_parser::back_shadow ( ) const
inline

Definition at line 494 of file style_parser.

494 {return m_back_shadow;}

◆ back_shadow() [2/2]

void tools::sg::style_parser::back_shadow ( float  a_v)
inline

Definition at line 495 of file style_parser.

495 {m_back_shadow = a_v;}

◆ bar_offset() [1/2]

float tools::sg::style_parser::bar_offset ( ) const
inline

Definition at line 570 of file style_parser.

570 {return m_bar_offset;}

◆ bar_offset() [2/2]

void tools::sg::style_parser::bar_offset ( float  a_v)
inline

Definition at line 569 of file style_parser.

569 {m_bar_offset = a_v;}

◆ bar_width() [1/2]

float tools::sg::style_parser::bar_width ( ) const
inline

Definition at line 573 of file style_parser.

573 {return m_bar_width;}

◆ bar_width() [2/2]

void tools::sg::style_parser::bar_width ( float  a_v)
inline

Definition at line 572 of file style_parser.

572 {m_bar_width = a_v;}

◆ check_2()

static bool tools::sg::style_parser::check_2 ( size_t  a_n,
const std::string &  a_s,
const std::string &  a_line,
std::ostream &  a_out 
)
inlinestaticprotected

Definition at line 1285 of file style_parser.

1287  {
1288  if(a_n!=2) {
1289  a_out << "style_parser::parse :"
1290  << " in " << sout(a_s)
1291  << " : " << sout(a_line)
1292  << " has a bad word count (two expected)."
1293  << std::endl;
1294  return false;
1295  }
1296  return true;
1297  }

◆ check_bool()

static bool tools::sg::style_parser::check_bool ( const std::string &  a_w,
const std::string &  a_s,
std::ostream &  a_out,
bool &  a_v 
)
inlinestaticprotected

Definition at line 1299 of file style_parser.

1300  {
1301  if(!to(a_w,a_v)){
1302  a_out << "style_parser::parse :"
1303  << " in " << sout(a_s)
1304  << " : " << sout(a_w)
1305  << " not a boolean."
1306  << std::endl;
1307  return false;
1308  }
1309  return true;
1310  }

◆ check_float()

static bool tools::sg::style_parser::check_float ( const std::string &  a_w,
const std::string &  a_s,
std::ostream &  a_out,
float &  a_v 
)
inlinestaticprotected

Definition at line 1338 of file style_parser.

1339  {
1340  if(!to<float>(a_w,a_v)){
1341  a_out << "style_parser::parse :"
1342  << " in " << sout(a_s)
1343  << " : " << sout(a_w)
1344  << " not a float."
1345  << std::endl;
1346  return false;
1347  }
1348  return true;
1349  }

◆ check_int()

static bool tools::sg::style_parser::check_int ( const std::string &  a_w,
const std::string &  a_s,
std::ostream &  a_out,
int &  a_v 
)
inlinestaticprotected

Definition at line 1312 of file style_parser.

1313  {
1314  if(!to<int>(a_w,a_v)){
1315  a_out << "style_parser::parse :"
1316  << " in " << sout(a_s)
1317  << " : " << sout(a_w)
1318  << " not an int."
1319  << std::endl;
1320  return false;
1321  }
1322  return true;
1323  }

◆ check_uint()

static bool tools::sg::style_parser::check_uint ( const std::string &  a_w,
const std::string &  a_s,
std::ostream &  a_out,
unsigned int &  a_v 
)
inlinestaticprotected

Definition at line 1325 of file style_parser.

1326  {
1327  if(!to<unsigned int>(a_w,a_v)){
1328  a_out << "style_parser::parse :"
1329  << " in " << sout(a_s)
1330  << " : " << sout(a_w)
1331  << " not an unsigned int."
1332  << std::endl;
1333  return false;
1334  }
1335  return true;
1336  }

◆ color() [1/2]

colorf tools::sg::style_parser::color ( ) const
inline

Definition at line 480 of file style_parser.

480 {return m_color;}

◆ color() [2/2]

void tools::sg::style_parser::color ( const colorf a_v)
inline

Definition at line 479 of file style_parser.

479 {m_color = a_v;}

◆ color_mapping() [1/2]

const std::string& tools::sg::style_parser::color_mapping ( ) const
inline

Definition at line 597 of file style_parser.

597 {return m_color_mapping;}

◆ color_mapping() [2/2]

void tools::sg::style_parser::color_mapping ( const std::string &  a_v)
inline

Definition at line 596 of file style_parser.

596 {m_color_mapping = a_v;}

◆ coloring() [1/2]

const std::string& tools::sg::style_parser::coloring ( ) const
inline

Definition at line 615 of file style_parser.

615 {return m_coloring;}

◆ coloring() [2/2]

void tools::sg::style_parser::coloring ( const std::string &  a_v)
inline

Definition at line 614 of file style_parser.

614 {m_coloring = a_v;}

◆ copy()

void tools::sg::style_parser::copy ( const style_parser a_from)
inline

Definition at line 148 of file style_parser.

148  {
149  m_color = a_from.m_color;
150  m_highlight_color = a_from.m_highlight_color;
151  m_back_color = a_from.m_back_color;
152  m_width = a_from.m_width;
153  m_line_width = a_from.m_line_width;
154  m_marker_size = a_from.m_marker_size;
155  m_point_size = a_from.m_point_size;
156  m_font_size = a_from.m_font_size;
157  m_font_modeling = a_from.m_font_modeling;
158  m_pattern = a_from.m_pattern;
159  m_line_pattern = a_from.m_line_pattern;
160  m_marker_style = a_from.m_marker_style;
161  m_area_style = a_from.m_area_style;
162  m_modeling = a_from.m_modeling;
163  m_light_model = a_from.m_light_model;
164  m_tick_modeling = a_from.m_tick_modeling;
165  m_encoding = a_from.m_encoding;
166  m_smoothing = a_from.m_smoothing;
167  m_hinting = a_from.m_hinting;
168  m_cut = a_from.m_cut;
169  m_painting = a_from.m_painting;
170  m_hatching = a_from.m_hatching;
171  m_projection = a_from.m_projection;
172  m_font = a_from.m_font;
173  m_multi_node_limit = a_from.m_multi_node_limit;
174  m_divisions = a_from.m_divisions;
175  m_rotation_steps = a_from.m_rotation_steps;
176  m_back_shadow = a_from.m_back_shadow;
177  m_spacing = a_from.m_spacing;
178  m_angle = a_from.m_angle;
179  m_scale = a_from.m_scale;
180  m_offset = a_from.m_offset;
181  m_strip_width = a_from.m_strip_width;
182  m_visible = a_from.m_visible;
183  m_bar_offset = a_from.m_bar_offset;
184  m_bar_width = a_from.m_bar_width;
185  m_editable = a_from.m_editable;
186  m_automated = a_from.m_automated;
187  m_options = a_from.m_options;
188  m_color_mapping = a_from.m_color_mapping;
189  m_enforced = a_from.m_enforced;
190  m_translation = a_from.m_translation;
191  m_front_face = a_from.m_front_face;
192  m_hjust = a_from.m_hjust;
193  m_vjust = a_from.m_vjust;
194  m_coloring = a_from.m_coloring;
195  m_title = a_from.m_title;
196  m_pickable = a_from.m_pickable;
197  }

◆ cut() [1/2]

const std::string& tools::sg::style_parser::cut ( ) const
inline

Definition at line 591 of file style_parser.

591 {return m_cut;}

◆ cut() [2/2]

void tools::sg::style_parser::cut ( const std::string &  a_v)
inline

Definition at line 590 of file style_parser.

590 {m_cut = a_v;}

◆ divisions() [1/2]

int tools::sg::style_parser::divisions ( ) const
inline

Definition at line 552 of file style_parser.

552 {return m_divisions;}

◆ divisions() [2/2]

void tools::sg::style_parser::divisions ( int  a_v)
inline

Definition at line 551 of file style_parser.

551 {m_divisions = a_v;}

◆ editable() [1/2]

bool tools::sg::style_parser::editable ( ) const
inline

Definition at line 585 of file style_parser.

585 {return m_editable;}

◆ editable() [2/2]

void tools::sg::style_parser::editable ( bool  a_v)
inline

Definition at line 584 of file style_parser.

584 {m_editable = a_v;}

◆ encoding() [1/2]

const std::string& tools::sg::style_parser::encoding ( ) const
inline

Definition at line 525 of file style_parser.

525 {return m_encoding;}

◆ encoding() [2/2]

void tools::sg::style_parser::encoding ( const std::string &  a_v)
inline

Definition at line 524 of file style_parser.

524 {m_encoding = a_v;}

◆ enforced() [1/2]

bool tools::sg::style_parser::enforced ( ) const
inline

Definition at line 600 of file style_parser.

600 {return m_enforced;}

◆ enforced() [2/2]

void tools::sg::style_parser::enforced ( bool  a_v)
inline

Definition at line 599 of file style_parser.

599 {m_enforced = a_v;}

◆ equal()

bool tools::sg::style_parser::equal ( const style_parser a_from)
inline

Definition at line 199 of file style_parser.

199  {
200  if(m_width!=a_from.m_width) return false;
201  if(m_line_width!=a_from.m_line_width) return false;
202  if(m_marker_size!=a_from.m_marker_size) return false;
203  if(m_point_size!=a_from.m_point_size) return false;
204  if(m_font_size!=a_from.m_font_size) return false;
205  if(m_font_modeling!=a_from.m_font_modeling) return false;
206  if(m_pattern!=a_from.m_pattern) return false;
207  if(m_line_pattern!=a_from.m_line_pattern) return false;
208  if(m_marker_style!=a_from.m_marker_style) return false;
209  if(m_area_style!=a_from.m_area_style) return false;
210  if(m_smoothing!=a_from.m_smoothing) return false;
211  if(m_hinting!=a_from.m_hinting) return false;
212  if(m_painting!=a_from.m_painting) return false;
213  if(m_hatching!=a_from.m_hatching) return false;
214  if(m_projection!=a_from.m_projection) return false;
215  if(m_multi_node_limit!=a_from.m_multi_node_limit) return false;
216  if(m_divisions!=a_from.m_divisions) return false;
217  if(m_rotation_steps!=a_from.m_rotation_steps) return false;
218  if(m_back_shadow!=a_from.m_back_shadow) return false;
219  if(m_spacing!=a_from.m_spacing) return false;
220  if(m_angle!=a_from.m_angle) return false;
221  if(m_scale!=a_from.m_scale) return false;
222  if(m_offset!=a_from.m_offset) return false;
223  if(m_strip_width!=a_from.m_strip_width) return false;
224  if(m_visible!=a_from.m_visible) return false;
225  if(m_bar_offset!=a_from.m_bar_offset) return false;
226  if(m_bar_width!=a_from.m_bar_width) return false;
227  if(m_editable!=a_from.m_editable) return false;
228  if(m_automated!=a_from.m_automated) return false;
229  if(m_enforced!=a_from.m_enforced) return false;
230 
231  //color
232  if(m_color!=a_from.m_color) return false;
233  if(m_highlight_color!=a_from.m_highlight_color) return false;
234  if(m_back_color!=a_from.m_back_color) return false;
235 
236  //std::string
237  if(m_modeling!=a_from.m_modeling) return false;
238  if(m_light_model!=a_from.m_light_model) return false;
239  if(m_tick_modeling!=a_from.m_tick_modeling) return false;
240  if(m_encoding!=a_from.m_encoding) return false;
241  if(m_cut!=a_from.m_cut) return false;
242  if(m_font!=a_from.m_font) return false;
243  if(m_options!=a_from.m_options) return false;
244  if(m_color_mapping!=a_from.m_color_mapping) return false;
245 
246  if(m_translation!=a_from.m_translation) return false;
247 
248  if(m_front_face!=a_from.m_front_face) return false;
249 
250  if(m_hjust!=a_from.m_hjust) return false;
251  if(m_vjust!=a_from.m_vjust) return false;
252 
253  if(m_coloring!=a_from.m_coloring) return false;
254  if(m_title!=a_from.m_title) return false;
255  if(m_pickable!=a_from.m_pickable) return false;
256 
257  return true;
258  }

◆ font() [1/2]

const std::string& tools::sg::style_parser::font ( ) const
inline

Definition at line 549 of file style_parser.

549 {return m_font;}

◆ font() [2/2]

void tools::sg::style_parser::font ( const std::string &  a_v)
inline

Definition at line 548 of file style_parser.

548 {m_font = a_v;}

◆ font_modeling() [1/2]

sg::font_modeling tools::sg::style_parser::font_modeling ( ) const
inline

Definition at line 510 of file style_parser.

510 {return m_font_modeling;}

◆ font_modeling() [2/2]

void tools::sg::style_parser::font_modeling ( sg::font_modeling  a_v)
inline

Definition at line 509 of file style_parser.

509 {m_font_modeling = a_v;}

◆ font_size() [1/2]

float tools::sg::style_parser::font_size ( ) const
inline

Definition at line 507 of file style_parser.

507 {return m_font_size;}

◆ font_size() [2/2]

void tools::sg::style_parser::font_size ( float  a_v)
inline

Definition at line 506 of file style_parser.

506 {m_font_size = a_v;}

◆ front_face() [1/2]

winding_type tools::sg::style_parser::front_face ( ) const
inline

Definition at line 606 of file style_parser.

606 {return m_front_face;}

◆ front_face() [2/2]

void tools::sg::style_parser::front_face ( winding_type  a_v)
inline

Definition at line 605 of file style_parser.

605 {m_front_face = a_v;}

◆ hatching() [1/2]

sg::hatching_policy tools::sg::style_parser::hatching ( ) const
inline

Definition at line 536 of file style_parser.

536 {return m_hatching;}

◆ hatching() [2/2]

void tools::sg::style_parser::hatching ( sg::hatching_policy  a_v)
inline

Definition at line 537 of file style_parser.

537 {m_hatching = a_v;}

◆ highlight_color() [1/2]

colorf tools::sg::style_parser::highlight_color ( ) const
inline

Definition at line 483 of file style_parser.

483 {return m_highlight_color;}

◆ highlight_color() [2/2]

void tools::sg::style_parser::highlight_color ( const colorf a_v)
inline

Definition at line 482 of file style_parser.

482 {m_highlight_color = a_v;}

◆ hinting() [1/2]

bool tools::sg::style_parser::hinting ( ) const
inline

Definition at line 531 of file style_parser.

531 {return m_hinting;}

◆ hinting() [2/2]

void tools::sg::style_parser::hinting ( bool  a_v)
inline

Definition at line 530 of file style_parser.

530 {m_hinting = a_v;}

◆ hjust() [1/2]

sg::hjust tools::sg::style_parser::hjust ( ) const
inline

Definition at line 609 of file style_parser.

609 {return m_hjust;}

◆ hjust() [2/2]

void tools::sg::style_parser::hjust ( sg::hjust  a_v)
inline

Definition at line 608 of file style_parser.

608 {m_hjust = a_v;}

◆ light_model() [1/2]

const std::string& tools::sg::style_parser::light_model ( ) const
inline

Definition at line 519 of file style_parser.

519 {return m_light_model;}

◆ light_model() [2/2]

void tools::sg::style_parser::light_model ( const std::string &  a_v)
inline

Definition at line 518 of file style_parser.

518 {m_light_model = a_v;}

◆ line_pattern() [1/2]

lpat tools::sg::style_parser::line_pattern ( ) const
inline

Definition at line 546 of file style_parser.

546 {return m_line_pattern;}

◆ line_pattern() [2/2]

void tools::sg::style_parser::line_pattern ( lpat  a_v)
inline

Definition at line 545 of file style_parser.

545 {m_line_pattern = a_v;}

◆ line_width() [1/2]

float tools::sg::style_parser::line_width ( ) const
inline

Definition at line 492 of file style_parser.

492 {return m_line_width;}

◆ line_width() [2/2]

void tools::sg::style_parser::line_width ( float  a_v)
inline

Definition at line 491 of file style_parser.

491 {m_line_width = a_v;}

◆ marker_size() [1/2]

float tools::sg::style_parser::marker_size ( ) const
inline

Definition at line 501 of file style_parser.

501 {return m_marker_size;}

◆ marker_size() [2/2]

void tools::sg::style_parser::marker_size ( float  a_v)
inline

Definition at line 500 of file style_parser.

500 {m_marker_size = a_v;}

◆ marker_style() [1/2]

sg::marker_style tools::sg::style_parser::marker_style ( ) const
inline

Definition at line 498 of file style_parser.

498 {return m_marker_style;}

◆ marker_style() [2/2]

void tools::sg::style_parser::marker_style ( sg::marker_style  a_v)
inline

Definition at line 497 of file style_parser.

497 {m_marker_style = a_v;}

◆ modeling() [1/2]

const std::string& tools::sg::style_parser::modeling ( ) const
inline

Definition at line 516 of file style_parser.

516 {return m_modeling ;}

◆ modeling() [2/2]

void tools::sg::style_parser::modeling ( const std::string &  a_v)
inline

Definition at line 515 of file style_parser.

515 {m_modeling = a_v;}

◆ multi_node_limit() [1/2]

int tools::sg::style_parser::multi_node_limit ( ) const
inline

Definition at line 576 of file style_parser.

576 {return m_multi_node_limit;}

◆ multi_node_limit() [2/2]

void tools::sg::style_parser::multi_node_limit ( int  a_v)
inline

Definition at line 575 of file style_parser.

575 {m_multi_node_limit = a_v;}

◆ no_limit()

static int tools::sg::style_parser::no_limit ( )
inlinestatic

Definition at line 146 of file style_parser.

146 {return (-1);}

◆ offset() [1/2]

float tools::sg::style_parser::offset ( ) const
inline

Definition at line 558 of file style_parser.

558 {return m_offset;}

◆ offset() [2/2]

void tools::sg::style_parser::offset ( float  a_v)
inline

Definition at line 557 of file style_parser.

557 {m_offset = a_v;}

◆ operator=()

style_parser& tools::sg::style_parser::operator= ( const style_parser a_from)
inline

Definition at line 141 of file style_parser.

141  {
142  copy(a_from);
143  return *this;
144  }

◆ options() [1/2]

const std::string& tools::sg::style_parser::options ( ) const
inline

Definition at line 594 of file style_parser.

594 {return m_options;}

◆ options() [2/2]

void tools::sg::style_parser::options ( const std::string &  a_v)
inline

Definition at line 593 of file style_parser.

593 {m_options = a_v;}

◆ painting() [1/2]

sg::painting_policy tools::sg::style_parser::painting ( ) const
inline

Definition at line 533 of file style_parser.

533 {return m_painting;}

◆ painting() [2/2]

void tools::sg::style_parser::painting ( sg::painting_policy  a_v)
inline

Definition at line 534 of file style_parser.

534 {m_painting = a_v;}

◆ parse()

bool tools::sg::style_parser::parse ( std::ostream &  a_out,
const cmaps_t a_cmaps,
const std::string &  a_s 
)
inline

Definition at line 624 of file style_parser.

624  {
625  // a_s = list of "name value" separated by \n
626  //::printf("debug : style_parser::parse : \"%s\"\n",a_s.c_str());
627  std::vector<std::string> lines;
628  get_lines(a_s,lines);
629 
630  tools_vforcit(std::string,lines,it) {
631  const std::string& line = *it;
632  if(line.empty()) continue;
633  if(line=="reset") {
634  reset();
635  continue;
636  }
637  std::vector<std::string> ws;
638  words(line," ",false,ws);
639  size_t wordn = ws.size();
640  if(!wordn) {
641  a_out << "style_parser::parse :"
642  << " in " << sout(a_s)
643  << " : " << sout(line)
644  << " has a bad word count (at least two expected)."
645  << std::endl;
646  return false;
647  }
648  const std::string& word0 = ws[0];
649  if(word0=="color") {
650  if(wordn==2) {
651  const std::string& word1 = ws[1];
652  if(!find_color(a_cmaps,word1,m_color)) {
653  a_out << "style_parser::parse :"
654  << " in " << sout(a_s)
655  << " : " << sout(word1)
656  << " not a color."
657  << std::endl;
658  return false;
659  }
660  } else if (wordn==4) {
661  const std::string& rs = ws[1];
662  float r;
663  if(!to<float>(rs,r)) {
664  a_out << "style_parser::parse :"
665  << " in " << sout(a_s)
666  << " : " << sout(rs)
667  << " not a number."
668  << std::endl;
669  return false;
670  }
671  const std::string& gs = ws[2];
672  float g;
673  if(!to<float>(gs,g)) {
674  a_out << "style_parser::parse :"
675  << " in " << sout(a_s)
676  << " : " << sout(gs)
677  << " not a number."
678  << std::endl;
679  return false;
680  }
681  const std::string& bs = ws[3];
682  float b;
683  if(!to<float>(bs,b)) {
684  a_out << "style_parser::parse :"
685  << " in " << sout(a_s)
686  << " : " << sout(bs)
687  << " not a number."
688  << std::endl;
689  return false;
690  }
691  m_color.set_value(r,g,b,1);
692 
693  } else if (wordn==5) {
694  const std::string& rs = ws[1];
695  float r;
696  if(!to<float>(rs,r)) {
697  a_out << "style_parser::parse :"
698  << " in " << sout(a_s)
699  << " : " << sout(rs)
700  << " not a number."
701  << std::endl;
702  return false;
703  }
704  const std::string& gs = ws[2];
705  float g;
706  if(!to<float>(gs,g)) {
707  a_out << "style_parser::parse :"
708  << " in " << sout(a_s)
709  << " : " << sout(gs)
710  << " not a number."
711  << std::endl;
712  return false;
713  }
714  const std::string& bs = ws[3];
715  float b;
716  if(!to<float>(bs,b)) {
717  a_out << "style_parser::parse :"
718  << " in " << sout(a_s)
719  << " : " << sout(bs)
720  << " not a number."
721  << std::endl;
722  return false;
723  }
724  const std::string& as = ws[4];
725  float a;
726  if(!to<float>(as,a)) {
727  a_out << "style_parser::parse :"
728  << " in " << sout(a_s)
729  << " : " << sout(as)
730  << " not a number."
731  << std::endl;
732  return false;
733  }
734  m_color.set_value(r,g,b,a);
735 
736  } else {
737  a_out << "style_parser::parse :"
738  << " in " << sout(a_s)
739  << " : " << sout(line)
740  << " has a bad word count (two or four expected)."
741  << std::endl;
742  return false;
743  }
744 
745  } else if(word0=="highlight_color") {
746  if(wordn==2) {
747  const std::string& word1 = ws[1];
748  if(!find_color(a_cmaps,word1,m_highlight_color)) {
749  a_out << "style_parser::parse :"
750  << " in " << sout(a_s)
751  << " : " << sout(word1)
752  << " not a color."
753  << std::endl;
754  return false;
755  }
756  } else if (wordn==4) {
757  const std::string& rs = ws[1];
758  float r;
759  if(!to<float>(rs,r)) {
760  a_out << "style_parser::parse :"
761  << " in " << sout(a_s)
762  << " : " << sout(rs)
763  << " not a number."
764  << std::endl;
765  return false;
766  }
767  const std::string& gs = ws[2];
768  float g;
769  if(!to<float>(gs,g)) {
770  a_out << "style_parser::parse :"
771  << " in " << sout(a_s)
772  << " : " << sout(gs)
773  << " not a number."
774  << std::endl;
775  return false;
776  }
777  const std::string& bs = ws[3];
778  float b;
779  if(!to<float>(bs,b)) {
780  a_out << "style_parser::parse :"
781  << " in " << sout(a_s)
782  << " : " << sout(bs)
783  << " not a number."
784  << std::endl;
785  return false;
786  }
787  m_highlight_color.set_value(r,g,b,1);
788 
789  } else if (wordn==5) {
790  const std::string& rs = ws[1];
791  float r;
792  if(!to<float>(rs,r)) {
793  a_out << "style_parser::parse :"
794  << " in " << sout(a_s)
795  << " : " << sout(rs)
796  << " not a number."
797  << std::endl;
798  return false;
799  }
800  const std::string& gs = ws[2];
801  float g;
802  if(!to<float>(gs,g)) {
803  a_out << "style_parser::parse :"
804  << " in " << sout(a_s)
805  << " : " << sout(gs)
806  << " not a number."
807  << std::endl;
808  return false;
809  }
810  const std::string& bs = ws[3];
811  float b;
812  if(!to<float>(bs,b)) {
813  a_out << "style_parser::parse :"
814  << " in " << sout(a_s)
815  << " : " << sout(bs)
816  << " not a number."
817  << std::endl;
818  return false;
819  }
820  const std::string& as = ws[4];
821  float a;
822  if(!to<float>(as,a)) {
823  a_out << "style_parser::parse :"
824  << " in " << sout(a_s)
825  << " : " << sout(as)
826  << " not a number."
827  << std::endl;
828  return false;
829  }
830  m_highlight_color.set_value(r,g,b,a);
831 
832  } else {
833  a_out << "style_parser::parse :"
834  << " in " << sout(a_s)
835  << " : " << sout(line)
836  << " has a bad word count (two or four expected)."
837  << std::endl;
838  return false;
839  }
840 
841  } else if(word0=="back_color") {
842  if(wordn==2) {
843  const std::string& word1 = ws[1];
844  if(!find_color(a_cmaps,word1,m_back_color)) {
845  a_out << "style_parser::parse :"
846  << " in " << sout(a_s)
847  << " : " << sout(word1)
848  << " not a color."
849  << std::endl;
850  return false;
851  }
852  } else if (wordn==4) {
853  const std::string& rs = ws[1];
854  float r;
855  if(!to<float>(rs,r)) {
856  a_out << "style_parser::parse :"
857  << " in " << sout(a_s)
858  << " : " << sout(rs)
859  << " not a number."
860  << std::endl;
861  return false;
862  }
863  const std::string& gs = ws[2];
864  float g;
865  if(!to<float>(gs,g)) {
866  a_out << "style_parser::parse :"
867  << " in " << sout(a_s)
868  << " : " << sout(gs)
869  << " not a number."
870  << std::endl;
871  return false;
872  }
873  const std::string& bs = ws[3];
874  float b;
875  if(!to<float>(bs,b)) {
876  a_out << "style_parser::parse :"
877  << " in " << sout(a_s)
878  << " : " << sout(bs)
879  << " not a number."
880  << std::endl;
881  return false;
882  }
883  m_back_color.set_value(r,g,b,1);
884 
885  } else if (wordn==5) {
886  const std::string& rs = ws[1];
887  float r;
888  if(!to<float>(rs,r)) {
889  a_out << "style_parser::parse :"
890  << " in " << sout(a_s)
891  << " : " << sout(rs)
892  << " not a number."
893  << std::endl;
894  return false;
895  }
896  const std::string& gs = ws[2];
897  float g;
898  if(!to<float>(gs,g)) {
899  a_out << "style_parser::parse :"
900  << " in " << sout(a_s)
901  << " : " << sout(gs)
902  << " not a number."
903  << std::endl;
904  return false;
905  }
906  const std::string& bs = ws[3];
907  float b;
908  if(!to<float>(bs,b)) {
909  a_out << "style_parser::parse :"
910  << " in " << sout(a_s)
911  << " : " << sout(bs)
912  << " not a number."
913  << std::endl;
914  return false;
915  }
916  const std::string& as = ws[4];
917  float a;
918  if(!to<float>(as,a)) {
919  a_out << "style_parser::parse :"
920  << " in " << sout(a_s)
921  << " : " << sout(as)
922  << " not a number."
923  << std::endl;
924  return false;
925  }
926  m_back_color.set_value(r,g,b,a);
927 
928  } else {
929  a_out << "style_parser::parse :"
930  << " in " << sout(a_s)
931  << " : " << sout(line)
932  << " has a bad word count (two or four expected)."
933  << std::endl;
934  return false;
935  }
936 
937  } else if(word0=="pattern") {
938  if(!check_2(wordn,a_s,line,a_out)) return false;
939  const std::string& word1 = ws[1];
940  unsigned long ul;
941  if(!sline_pattern(word1,m_pattern)) {
942  if(!to_ulong(word1,ul)) {
943  a_out << "style_parser::parse :"
944  << " in " << sout(a_s)
945  << " : " << sout(word1)
946  << " not a line pattern."
947  << std::endl;
948  return false;
949  }
950  m_pattern = (lpat)ul;
951  }
952 
953  } else if(word0=="line_pattern") {
954  if(!check_2(wordn,a_s,line,a_out)) return false;
955  const std::string& word1 = ws[1];
956  unsigned long ul;
957  if(!sline_pattern(word1,m_line_pattern)) {
958  if(!to_ulong(word1,ul)) {
959  a_out << "style_parser::parse :"
960  << " in " << sout(a_s)
961  << " : " << sout(word1)
962  << " not a line pattern."
963  << std::endl;
964  return false;
965  }
966  m_line_pattern = (lpat)ul;
967  }
968  } else if(word0=="marker_style") {
969  if(!check_2(wordn,a_s,line,a_out)) return false;
970  const std::string& word1 = ws[1];
971  if(!smarker_style(word1,m_marker_style)) {
972  a_out << "style_parser::parse :"
973  << " in " << sout(a_s)
974  << " : " << sout(word1)
975  << " not a marker_style."
976  << std::endl;
977  return false;
978  }
979  } else if(word0=="area_style") {
980  if(!check_2(wordn,a_s,line,a_out)) return false;
981  const std::string& word1 = ws[1];
982  if(!sarea_style(word1,m_area_style)) {
983  a_out << "style_parser::parse :"
984  << " in " << sout(a_s)
985  << " : " << sout(word1)
986  << " not a area_style."
987  << std::endl;
988  return false;
989  }
990  } else if(word0=="modeling") {
991  if(!check_2(wordn,a_s,line,a_out)) return false;
992  m_modeling = ws[1];
993  } else if(word0=="light_model") {
994  if(!check_2(wordn,a_s,line,a_out)) return false;
995  m_light_model = ws[1];
996  } else if(word0=="tick_modeling") {
997  if(!check_2(wordn,a_s,line,a_out)) return false;
998  m_tick_modeling = ws[1];
999  } else if(word0=="encoding") {
1000  if(!check_2(wordn,a_s,line,a_out)) return false;
1001  m_encoding = ws[1];
1002  } else if(word0=="smoothing") {
1003  if(!check_2(wordn,a_s,line,a_out)) return false;
1004  bool value;
1005  if(!check_bool(ws[1],a_s,a_out,value)) return false;
1006  m_smoothing = value;
1007  } else if(word0=="hinting") {
1008  if(!check_2(wordn,a_s,line,a_out)) return false;
1009  bool value;
1010  if(!check_bool(ws[1],a_s,a_out,value)) return false;
1011  m_hinting = value;
1012  } else if(word0=="enforced") {
1013  if(!check_2(wordn,a_s,line,a_out)) return false;
1014  bool value;
1015  if(!check_bool(ws[1],a_s,a_out,value)) return false;
1016  m_enforced = value;
1017  } else if(word0=="cut") {
1018  m_cut = "";
1019  for(unsigned int wordi=1;wordi<wordn;wordi++) {
1020  if(wordi!=1) m_cut += " ";
1021  m_cut += ws[wordi];
1022  }
1023  } else if(word0=="options") {
1024  m_options = "";
1025  for(unsigned int wordi=1;wordi<wordn;wordi++) {
1026  if(wordi!=1) m_options += " ";
1027  m_options += ws[wordi];
1028  }
1029  } else if(word0=="color_mapping") {
1030  m_color_mapping = "";
1031  for(unsigned int wordi=1;wordi<wordn;wordi++) {
1032  if(wordi!=1) m_color_mapping += " ";
1033  m_color_mapping += ws[wordi];
1034  }
1035  } else if(word0=="painting") {
1036  if(!check_2(wordn,a_s,line,a_out)) return false;
1037  if(!spainting_policy(ws[1],m_painting)) {
1038  a_out << "style_parser::parse :"
1039  << " in " << sout(a_s)
1040  << " : " << sout(ws[1])
1041  << " not a painting_policy."
1042  << std::endl;
1043  return false;
1044  }
1045  } else if(word0=="hatching") {
1046  if(!check_2(wordn,a_s,line,a_out)) return false;
1047  if(!shatching_policy(ws[1],m_hatching)) {
1048  a_out << "style_parser::parse :"
1049  << " in " << sout(a_s)
1050  << " : " << sout(ws[1])
1051  << " not a hatching_policy."
1052  << std::endl;
1053  return false;
1054  }
1055  } else if(word0=="projection") {
1056  if(!check_2(wordn,a_s,line,a_out)) return false;
1057  if(!sprojection_type(ws[1],m_projection)) {
1058  a_out << "style_parser::parse :"
1059  << " in " << sout(a_s)
1060  << " : " << sout(ws[1])
1061  << " not a projection_type."
1062  << std::endl;
1063  return false;
1064  }
1065  } else if(word0=="font") {
1066  if(!check_2(wordn,a_s,line,a_out)) return false;
1067  font(ws[1]);
1068  } else if(word0=="width") {
1069  if(!check_2(wordn,a_s,line,a_out)) return false;
1070  float value;
1071  if(!check_float(ws[1],a_s,a_out,value)) return false;
1072  m_width = value;
1073  } else if(word0=="line_width") {
1074  if(!check_2(wordn,a_s,line,a_out)) return false;
1075  float value;
1076  if(!check_float(ws[1],a_s,a_out,value)) return false;
1077  m_line_width = value;
1078  } else if(word0=="marker_size") {
1079  if(!check_2(wordn,a_s,line,a_out)) return false;
1080  float value;
1081  if(!check_float(ws[1],a_s,a_out,value)) return false;
1082  m_marker_size = value;
1083  } else if(word0=="point_size") {
1084  if(!check_2(wordn,a_s,line,a_out)) return false;
1085  float value;
1086  if(!check_float(ws[1],a_s,a_out,value)) return false;
1087  m_point_size = value;
1088  } else if(word0=="font_size") {
1089  if(!check_2(wordn,a_s,line,a_out)) return false;
1090  float value;
1091  if(!check_float(ws[1],a_s,a_out,value)) return false;
1092  m_font_size = value;
1093  } else if(word0=="font_modeling") {
1094  if(!check_2(wordn,a_s,line,a_out)) return false;
1096  else if(ws[1]==s_font_filled()) m_font_modeling = font_filled;
1097  else if(ws[1]==s_font_pixmap()) m_font_modeling = font_pixmap;
1098  else {
1099  a_out << "style_parser::parse :"
1100  << " in " << sout(a_s)
1101  << " : " << sout(ws[1])
1102  << " not a font_modeling."
1103  << std::endl;
1104  return false;
1105  }
1106  } else if(word0=="back_shadow") {
1107  if(!check_2(wordn,a_s,line,a_out)) return false;
1108  float value;
1109  if(!check_float(ws[1],a_s,a_out,value)) return false;
1110  if(value<0.F) value = 0.F;
1111  m_back_shadow = value;
1112  } else if(word0=="multi_node_limit") {
1113  if(!check_2(wordn,a_s,line,a_out)) return false;
1114  int value = 0;
1115  if(!check_int(ws[1],a_s,a_out,value)) return false;
1116  m_multi_node_limit = value;
1117  } else if(word0=="divisions") {
1118  if(!check_2(wordn,a_s,line,a_out)) return false;
1119  int value = 0;
1120  if(!check_int(ws[1],a_s,a_out,value)) return false;
1121  m_divisions = value;
1122  } else if(word0=="rotation_steps") {
1123  if(!check_2(wordn,a_s,line,a_out)) return false;
1124  unsigned int value;
1125  if(!check_uint(ws[1],a_s,a_out,value)) return false;
1126  m_rotation_steps = value;
1127  } else if(word0=="angle") {
1128  if(!check_2(wordn,a_s,line,a_out)) return false;
1129  float value;
1130  if(!check_float(ws[1],a_s,a_out,value)) return false;
1131  m_angle = value;
1132  } else if(word0=="scale") {
1133  if(!check_2(wordn,a_s,line,a_out)) return false;
1134  float value;
1135  if(!check_float(ws[1],a_s,a_out,value)) return false;
1136  m_scale = value;
1137  } else if(word0=="offset") {
1138  if(!check_2(wordn,a_s,line,a_out)) return false;
1139  float value;
1140  if(!check_float(ws[1],a_s,a_out,value)) return false;
1141  m_offset = value;
1142  } else if(word0=="strip_width") {
1143  if(!check_2(wordn,a_s,line,a_out)) return false;
1144  float value;
1145  if(!check_float(ws[1],a_s,a_out,value)) return false;
1146  m_strip_width = value;
1147  } else if(word0=="spacing") {
1148  if(!check_2(wordn,a_s,line,a_out)) return false;
1149  float value;
1150  if(!check_float(ws[1],a_s,a_out,value)) return false;
1151  m_spacing = value;
1152  } else if(word0=="visible") {
1153  if(!check_2(wordn,a_s,line,a_out)) return false;
1154  bool value;
1155  if(!check_bool(ws[1],a_s,a_out,value)) return false;
1156  m_visible = value;
1157  } else if(word0=="editable") {
1158  if(!check_2(wordn,a_s,line,a_out)) return false;
1159  bool value;
1160  if(!check_bool(ws[1],a_s,a_out,value)) return false;
1161  m_editable = value;
1162  } else if(word0=="pickable") {
1163  if(!check_2(wordn,a_s,line,a_out)) return false;
1164  bool value;
1165  if(!check_bool(ws[1],a_s,a_out,value)) return false;
1166  m_pickable = value;
1167  } else if(word0=="automated") {
1168  if(!check_2(wordn,a_s,line,a_out)) return false;
1169  bool value;
1170  if(!check_bool(ws[1],a_s,a_out,value)) return false;
1171  m_automated = value;
1172  } else if(word0=="bar_offset") {
1173  if(!check_2(wordn,a_s,line,a_out)) return false;
1174  float value;
1175  if(!check_float(ws[1],a_s,a_out,value)) return false;
1176  m_bar_offset = value;
1177  } else if(word0=="bar_width") {
1178  if(!check_2(wordn,a_s,line,a_out)) return false;
1179  float value;
1180  if(!check_float(ws[1],a_s,a_out,value)) return false;
1181  m_bar_width = value;
1182 
1183  } else if(word0=="translation") {
1184  if (wordn==4) {
1185  const std::string& sx = ws[1];
1186  float x;
1187  if(!to<float>(sx,x)) {
1188  a_out << "style_parser::parse :"
1189  << " in " << sout(a_s)
1190  << " : " << sout(sx)
1191  << " not a number."
1192  << std::endl;
1193  return false;
1194  }
1195  const std::string& sy = ws[2];
1196  float y;
1197  if(!to<float>(sy,y)) {
1198  a_out << "style_parser::parse :"
1199  << " in " << sout(a_s)
1200  << " : " << sout(sy)
1201  << " not a number."
1202  << std::endl;
1203  return false;
1204  }
1205  const std::string& sz = ws[3];
1206  float z;
1207  if(!to<float>(sz,z)) {
1208  a_out << "style_parser::parse :"
1209  << " in " << sout(a_s)
1210  << " : " << sout(sz)
1211  << " not a number."
1212  << std::endl;
1213  return false;
1214  }
1215  m_translation.set_value(x,y,z);
1216  } else {
1217  a_out << "style_parser::parse :"
1218  << " in " << sout(a_s)
1219  << " has a bad word count (four expected)."
1220  << std::endl;
1221  return false;
1222  }
1223 
1224  } else if(word0=="front_face") {
1225  if(!check_2(wordn,a_s,line,a_out)) return false;
1226  const std::string& word1 = ws[1];
1227  if(word1=="ccw") {
1229  } else if(word1=="cw") {
1231  } else { //ccw
1232  a_out << "style_parser::parse :"
1233  << " in " << sout(a_s)
1234  << " : " << sout(word1)
1235  << " not a winding type."
1236  << std::endl;
1237  return false;
1238  }
1239 
1240  } else if(word0=="hjust") {
1241  if(!check_2(wordn,a_s,line,a_out)) return false;
1242  const std::string& word1 = ws[1];
1243  if(!shjust(word1,m_hjust)) {
1244  a_out << "style_parser::parse :"
1245  << " in " << sout(a_s)
1246  << " : " << sout(word1)
1247  << " not a hjust."
1248  << std::endl;
1249  return false;
1250  }
1251 
1252  } else if(word0=="vjust") {
1253  if(!check_2(wordn,a_s,line,a_out)) return false;
1254  const std::string& word1 = ws[1];
1255  if(!svjust(word1,m_vjust)) {
1256  a_out << "style_parser::parse :"
1257  << " in " << sout(a_s)
1258  << " : " << sout(word1)
1259  << " not a vjust."
1260  << std::endl;
1261  return false;
1262  }
1263 
1264  } else if(word0=="coloring") {
1265  if(!check_2(wordn,a_s,line,a_out)) return false;
1266  m_coloring = ws[1];
1267 
1268  } else if(word0=="title") {
1269  if(!check_2(wordn,a_s,line,a_out)) return false;
1270  m_title = ws[1];
1271 
1272  } else {
1273  a_out << "style_parser::parse :"
1274  << " in " << sout(a_s)
1275  << " : " << sout(word0)
1276  << " bad option."
1277  << std::endl;
1278  return false;
1279  }
1280  }
1281  return true;
1282  }

◆ pattern() [1/2]

lpat tools::sg::style_parser::pattern ( ) const
inline

Definition at line 543 of file style_parser.

543 {return m_pattern;}

◆ pattern() [2/2]

void tools::sg::style_parser::pattern ( lpat  a_v)
inline

Definition at line 542 of file style_parser.

542 {m_pattern = a_v;}

◆ pickable() [1/2]

bool tools::sg::style_parser::pickable ( ) const
inline

Definition at line 621 of file style_parser.

621 {return m_pickable;}

◆ pickable() [2/2]

void tools::sg::style_parser::pickable ( bool  a_v)
inline

Definition at line 620 of file style_parser.

620 {m_pickable = a_v;}

◆ point_size() [1/2]

float tools::sg::style_parser::point_size ( ) const
inline

Definition at line 504 of file style_parser.

504 {return m_point_size;}

◆ point_size() [2/2]

void tools::sg::style_parser::point_size ( float  a_v)
inline

Definition at line 503 of file style_parser.

503 {m_point_size = a_v;}

◆ projection() [1/2]

sg::projection_type tools::sg::style_parser::projection ( ) const
inline

Definition at line 539 of file style_parser.

539 {return m_projection;}

◆ projection() [2/2]

void tools::sg::style_parser::projection ( sg::projection_type  a_v)
inline

Definition at line 540 of file style_parser.

540 {m_projection = a_v;}

◆ reset()

virtual void tools::sg::style_parser::reset ( )
inlinevirtual

Definition at line 260 of file style_parser.

260  { //virtual because of SoGC
261  m_color = colorf_black();
262  m_highlight_color = colorf_lightgrey();
263  m_back_color = colorf_white();
264  m_width = 1;
265  m_line_width = 1;
266  m_marker_size = 1;
267  m_point_size = 1;
268  m_font_size = 10;
278  m_smoothing = false;
279  m_hinting = false;
280  m_cut = "";
284  m_font = "default";
286  m_back_shadow = 0;
287  m_divisions = 510;
288  m_rotation_steps = 24;
289  m_spacing = 0.05F;
290  m_angle = fpi()/4;
291  m_scale = 1;
292  m_offset = 0;
293  m_strip_width = 0;
294  m_visible = true;
295  m_bar_offset = 0.25F;
296  m_bar_width = 0.5F;
297  m_editable = false;
298  m_automated = true;
299  m_options = "";
300  m_color_mapping = "";
301  m_enforced = false;
302  m_translation = vec3f(0,0,0);
304  m_hjust = left;
305  m_vjust = bottom;
306  m_coloring = "";
307  m_title = "";
308  m_pickable = false;
309  }

◆ rotation_steps() [1/2]

unsigned int tools::sg::style_parser::rotation_steps ( ) const
inline

Definition at line 555 of file style_parser.

555 {return m_rotation_steps;}

◆ rotation_steps() [2/2]

void tools::sg::style_parser::rotation_steps ( unsigned int  a_v)
inline

Definition at line 554 of file style_parser.

554 {m_rotation_steps = a_v;}

◆ scale() [1/2]

float tools::sg::style_parser::scale ( ) const
inline

Definition at line 567 of file style_parser.

567 {return m_scale;}

◆ scale() [2/2]

void tools::sg::style_parser::scale ( float  a_v)
inline

Definition at line 566 of file style_parser.

566 {m_scale = a_v;}

◆ smoothing() [1/2]

bool tools::sg::style_parser::smoothing ( ) const
inline

Definition at line 528 of file style_parser.

528 {return m_smoothing;}

◆ smoothing() [2/2]

void tools::sg::style_parser::smoothing ( bool  a_v)
inline

Definition at line 527 of file style_parser.

527 {m_smoothing = a_v;}

◆ spacing() [1/2]

float tools::sg::style_parser::spacing ( ) const
inline

Definition at line 579 of file style_parser.

579 {return m_spacing;}

◆ spacing() [2/2]

void tools::sg::style_parser::spacing ( float  a_v)
inline

Definition at line 578 of file style_parser.

578 {m_spacing = a_v;}

◆ strip_width() [1/2]

float tools::sg::style_parser::strip_width ( ) const
inline

Definition at line 561 of file style_parser.

561 {return m_strip_width;}

◆ strip_width() [2/2]

void tools::sg::style_parser::strip_width ( float  a_v)
inline

Definition at line 560 of file style_parser.

560 {m_strip_width = a_v;}

◆ tick_modeling() [1/2]

const std::string& tools::sg::style_parser::tick_modeling ( ) const
inline

Definition at line 522 of file style_parser.

522 {return m_tick_modeling;}

◆ tick_modeling() [2/2]

void tools::sg::style_parser::tick_modeling ( const std::string &  a_v)
inline

Definition at line 521 of file style_parser.

521 {m_tick_modeling = a_v;}

◆ title() [1/2]

const std::string& tools::sg::style_parser::title ( ) const
inline

Definition at line 618 of file style_parser.

618 {return m_title;}

◆ title() [2/2]

void tools::sg::style_parser::title ( const std::string &  a_v)
inline

Definition at line 617 of file style_parser.

617 {m_title = a_v;}

◆ tos()

std::string tools::sg::style_parser::tos ( ) const
inline

Definition at line 311 of file style_parser.

311  {
312  char ss[40 * 32];
313  snpf(ss,sizeof(ss),
314 "color %g %g %g\n\
315 highlight_color %g %g %g\n\
316 back_color %g %g %g\n\
317 width %g\n\
318 line_width %g\n\
319 marker_size %g\n\
320 point_size %g\n\
321 font_size %g\n\
322 pattern %x\n\
323 line_pattern %x\n\
324 multi_node_limit %d\n\
325 back_shadow %g\n\
326 divisions %d\n\
327 rotation_steps %d\n\
328 angle %g\n\
329 scale %g\n\
330 offset %g\n\
331 strip_width %g\n\
332 spacing %g\n\
333 bar_offset %g\n\
334 bar_width %g\n\
335 translation %g %g %g"
336  ,m_color[0],m_color[1],m_color[2]
339  ,m_width
340  ,m_line_width
342  ,m_point_size
343  ,m_font_size
344  ,m_pattern
348  ,m_divisions
350  ,m_angle
351  ,m_scale
352  ,m_offset
354  ,m_spacing
355  ,m_bar_offset
356  ,m_bar_width
358 
359  std::string lf("\n");
360  std::string s(ss);
361 
362  s += lf;
363  s += "smoothing ";
364  s += (m_smoothing?"true":"false");
365 
366  s += lf;
367  s += "hinting ";
368  s += (m_hinting?"true":"false");
369 
370  s += lf;
371  s += "enforced ";
372  s += (m_enforced?"true":"false");
373 
374  s += lf;
375  s += "visible ";
376  s += (m_visible?"true":"false");
377 
378  s += lf;
379  s += "editable ";
380  s += (m_editable?"true":"false");
381 
382  s += lf;
383  s += "automated ";
384  s += (m_automated?"true":"false");
385 
386  s += lf;
387  s += "pickable ";
388  s += (m_pickable?"true":"false");
389 
390  s += lf;
391  s += "marker_style ";
393 
394  s += lf;
395  s += "area_style ";
397 
398  s += lf;
399  s += "modeling ";
400  s += m_modeling;
401 
402  s += lf;
403  s += "coloring ";
404  s += m_coloring;
405 
406  s += lf;
407  s += "title ";
408  s += m_title;
409 
410  s += lf;
411  s += "light_model ";
412  s += m_light_model;
413 
414  s += lf;
415  s += "tick_modeling ";
416  s += m_tick_modeling;
417 
418  s += lf;
419  s += "encoding ";
420  s += m_encoding;
421 
422  s += lf;
423  s += "cut ";
424  s += m_cut;
425 
426  s += lf;
427  s += "painting ";
429 
430  s += lf;
431  s += "hatching ";
433 
434  s += lf;
435  s += "projection ";
437 
438  s += lf;
439  s += "font ";
440  s += m_font;
441 
443  s += lf;
444  s += "font_modeling ";
445  s += s_font_outline();
446  } else if(m_font_modeling==font_filled) {
447  s += lf;
448  s += "font_modeling ";
449  s += s_font_filled();
450  } else if(m_font_modeling==font_pixmap) {
451  s += lf;
452  s += "font_modeling ";
453  s += s_font_pixmap();
454  }
455 
456  s += lf;
457  s += "options ";
458  s += m_options;
459 
460  s += lf;
461  s += "color_mapping ";
462  s += m_color_mapping;
463 
464  s += lf;
465  s += "front_face ";
466  s += (m_front_face==winding_ccw?"ccw":"cw");
467 
468  s += lf;
469  s += "hjust ";
470  s += shjust(m_hjust);
471 
472  s += lf;
473  s += "vjust ";
474  s += svjust(m_vjust);
475 
476  return s;
477  }

◆ translation() [1/2]

vec3f tools::sg::style_parser::translation ( ) const
inline

Definition at line 603 of file style_parser.

603 {return m_translation;}

◆ translation() [2/2]

void tools::sg::style_parser::translation ( const vec3f a_v)
inline

Definition at line 602 of file style_parser.

602 {m_translation = a_v;}

◆ visible() [1/2]

bool tools::sg::style_parser::visible ( ) const
inline

Definition at line 582 of file style_parser.

582 {return m_visible;}

◆ visible() [2/2]

void tools::sg::style_parser::visible ( bool  a_v)
inline

Definition at line 581 of file style_parser.

581 {m_visible = a_v;}

◆ vjust() [1/2]

sg::vjust tools::sg::style_parser::vjust ( ) const
inline

Definition at line 612 of file style_parser.

612 {return m_vjust;}

◆ vjust() [2/2]

void tools::sg::style_parser::vjust ( sg::vjust  a_v)
inline

Definition at line 611 of file style_parser.

611 {m_vjust = a_v;}

◆ width() [1/2]

float tools::sg::style_parser::width ( ) const
inline

Definition at line 489 of file style_parser.

489 {return m_width;}

◆ width() [2/2]

void tools::sg::style_parser::width ( float  a_v)
inline

Definition at line 488 of file style_parser.

488 {m_width = a_v;}

Member Data Documentation

◆ m_angle

float tools::sg::style_parser::m_angle
protected

Definition at line 1381 of file style_parser.

◆ m_area_style

sg::area_style tools::sg::style_parser::m_area_style
protected

Definition at line 1364 of file style_parser.

◆ m_automated

bool tools::sg::style_parser::m_automated
protected

Definition at line 1389 of file style_parser.

◆ m_back_color

colorf tools::sg::style_parser::m_back_color
protected

Definition at line 1354 of file style_parser.

◆ m_back_shadow

float tools::sg::style_parser::m_back_shadow
protected

Definition at line 1379 of file style_parser.

◆ m_bar_offset

float tools::sg::style_parser::m_bar_offset
protected

Definition at line 1386 of file style_parser.

◆ m_bar_width

float tools::sg::style_parser::m_bar_width
protected

Definition at line 1387 of file style_parser.

◆ m_color

colorf tools::sg::style_parser::m_color
protected

Definition at line 1352 of file style_parser.

◆ m_color_mapping

std::string tools::sg::style_parser::m_color_mapping
protected

Definition at line 1391 of file style_parser.

◆ m_coloring

std::string tools::sg::style_parser::m_coloring
protected

Definition at line 1397 of file style_parser.

◆ m_cut

std::string tools::sg::style_parser::m_cut
protected

Definition at line 1371 of file style_parser.

◆ m_divisions

int tools::sg::style_parser::m_divisions
protected

Definition at line 1377 of file style_parser.

◆ m_editable

bool tools::sg::style_parser::m_editable
protected

Definition at line 1388 of file style_parser.

◆ m_encoding

std::string tools::sg::style_parser::m_encoding
protected

Definition at line 1368 of file style_parser.

◆ m_enforced

bool tools::sg::style_parser::m_enforced
protected

Definition at line 1392 of file style_parser.

◆ m_font

std::string tools::sg::style_parser::m_font
protected

Definition at line 1375 of file style_parser.

◆ m_font_modeling

sg::font_modeling tools::sg::style_parser::m_font_modeling
protected

Definition at line 1360 of file style_parser.

◆ m_font_size

float tools::sg::style_parser::m_font_size
protected

Definition at line 1359 of file style_parser.

◆ m_front_face

winding_type tools::sg::style_parser::m_front_face
protected

Definition at line 1394 of file style_parser.

◆ m_hatching

sg::hatching_policy tools::sg::style_parser::m_hatching
protected

Definition at line 1373 of file style_parser.

◆ m_highlight_color

colorf tools::sg::style_parser::m_highlight_color
protected

Definition at line 1353 of file style_parser.

◆ m_hinting

bool tools::sg::style_parser::m_hinting
protected

Definition at line 1370 of file style_parser.

◆ m_hjust

sg::hjust tools::sg::style_parser::m_hjust
protected

Definition at line 1395 of file style_parser.

◆ m_light_model

std::string tools::sg::style_parser::m_light_model
protected

Definition at line 1366 of file style_parser.

◆ m_line_pattern

lpat tools::sg::style_parser::m_line_pattern
protected

Definition at line 1362 of file style_parser.

◆ m_line_width

float tools::sg::style_parser::m_line_width
protected

Definition at line 1356 of file style_parser.

◆ m_marker_size

float tools::sg::style_parser::m_marker_size
protected

Definition at line 1357 of file style_parser.

◆ m_marker_style

sg::marker_style tools::sg::style_parser::m_marker_style
protected

Definition at line 1363 of file style_parser.

◆ m_modeling

std::string tools::sg::style_parser::m_modeling
protected

Definition at line 1365 of file style_parser.

◆ m_multi_node_limit

int tools::sg::style_parser::m_multi_node_limit
protected

Definition at line 1376 of file style_parser.

◆ m_offset

float tools::sg::style_parser::m_offset
protected

Definition at line 1383 of file style_parser.

◆ m_options

std::string tools::sg::style_parser::m_options
protected

Definition at line 1390 of file style_parser.

◆ m_painting

sg::painting_policy tools::sg::style_parser::m_painting
protected

Definition at line 1372 of file style_parser.

◆ m_pattern

lpat tools::sg::style_parser::m_pattern
protected

Definition at line 1361 of file style_parser.

◆ m_pickable

bool tools::sg::style_parser::m_pickable
protected

Definition at line 1399 of file style_parser.

◆ m_point_size

float tools::sg::style_parser::m_point_size
protected

Definition at line 1358 of file style_parser.

◆ m_projection

sg::projection_type tools::sg::style_parser::m_projection
protected

Definition at line 1374 of file style_parser.

◆ m_rotation_steps

unsigned int tools::sg::style_parser::m_rotation_steps
protected

Definition at line 1378 of file style_parser.

◆ m_scale

float tools::sg::style_parser::m_scale
protected

Definition at line 1382 of file style_parser.

◆ m_smoothing

bool tools::sg::style_parser::m_smoothing
protected

Definition at line 1369 of file style_parser.

◆ m_spacing

float tools::sg::style_parser::m_spacing
protected

Definition at line 1380 of file style_parser.

◆ m_strip_width

float tools::sg::style_parser::m_strip_width
protected

Definition at line 1384 of file style_parser.

◆ m_tick_modeling

std::string tools::sg::style_parser::m_tick_modeling
protected

Definition at line 1367 of file style_parser.

◆ m_title

std::string tools::sg::style_parser::m_title
protected

Definition at line 1398 of file style_parser.

◆ m_translation

vec3f tools::sg::style_parser::m_translation
protected

Definition at line 1393 of file style_parser.

◆ m_visible

bool tools::sg::style_parser::m_visible
protected

Definition at line 1385 of file style_parser.

◆ m_vjust

sg::vjust tools::sg::style_parser::m_vjust
protected

Definition at line 1396 of file style_parser.

◆ m_width

float tools::sg::style_parser::m_width
protected

Definition at line 1355 of file style_parser.


The documentation for this class was generated from the following file:
tools::sg::style_parser::no_limit
static int no_limit()
Definition: style_parser:146
tools::sg::style_parser::m_encoding
std::string m_encoding
Definition: style_parser:1368
tools::sg::style_parser::m_tick_modeling
std::string m_tick_modeling
Definition: style_parser:1367
tools::sg::font_pixmap
@ font_pixmap
Definition: enums:94
tools::sg::light_model_phong
const std::string & light_model_phong()
Definition: strings:178
tools::sg::style_parser::m_marker_size
float m_marker_size
Definition: style_parser:1357
tools::sg::modeling_boxes
const std::string & modeling_boxes()
Definition: strings:64
tools::sg::style_parser::m_rotation_steps
unsigned int m_rotation_steps
Definition: style_parser:1378
tools::sg::sarea_style
bool sarea_style(const std::string &a_s, area_style &a_v)
Definition: senum:147
tools::sg::find_color
bool find_color(const cmaps_t &a_cmaps, const std::string &a_s, colorf &a_col)
Definition: style_colormap:549
tools::sg::style_parser::m_point_size
float m_point_size
Definition: style_parser:1358
tools::sg::winding_ccw
@ winding_ccw
Definition: enums:105
tools::sg::projection_none
@ projection_none
Definition: enums:50
tools::sg::style_parser::m_multi_node_limit
int m_multi_node_limit
Definition: style_parser:1376
tools::get_lines
void get_lines(const std::string &a_string, std::vector< std::string > &a_lines)
Definition: get_lines:14
tools::vec3::set_value
void set_value(const T &a0, const T &a1, const T &a2)
Definition: vec3:92
tools::sg::style_parser::m_modeling
std::string m_modeling
Definition: style_parser:1365
tools::sg::style_parser::m_line_width
float m_line_width
Definition: style_parser:1356
tools::sg::style_parser::m_line_pattern
lpat m_line_pattern
Definition: style_parser:1362
tools::sg::style_parser::m_spacing
float m_spacing
Definition: style_parser:1380
tools::sg::style_parser::check_float
static bool check_float(const std::string &a_w, const std::string &a_s, std::ostream &a_out, float &a_v)
Definition: style_parser:1338
tools::gl::lines
mode_t lines()
Definition: glprims:17
tools::sg::shjust
bool shjust(const std::string &a_s, hjust &a_v)
Definition: senum:26
tools::sg::style_parser::m_projection
sg::projection_type m_projection
Definition: style_parser:1374
tools::sg::style_parser::m_offset
float m_offset
Definition: style_parser:1383
tools::sg::spainting_policy
bool spainting_policy(const std::string &a_s, painting_policy &a_v)
Definition: senum:189
tools::fpi
float fpi()
Definition: mathf:11
tools::sg::marker_dot
@ marker_dot
Definition: enums:18
tools::sg::style_parser::m_font_modeling
sg::font_modeling m_font_modeling
Definition: style_parser:1360
tools::sg::winding_cw
@ winding_cw
Definition: enums:106
tools::sg::style_parser::check_int
static bool check_int(const std::string &a_w, const std::string &a_s, std::ostream &a_out, int &a_v)
Definition: style_parser:1312
tools::sg::style_parser::m_painting
sg::painting_policy m_painting
Definition: style_parser:1372
tools::sg::style_parser::m_divisions
int m_divisions
Definition: style_parser:1377
tools::sg::tick_modeling_hippo
const std::string & tick_modeling_hippo()
Definition: strings:19
tools::sg::style_parser::m_light_model
std::string m_light_model
Definition: style_parser:1366
tools::sg::style_parser::m_smoothing
bool m_smoothing
Definition: style_parser:1369
tools::sg::left
@ left
Definition: enums:74
tools::sg::style_parser::m_marker_style
sg::marker_style m_marker_style
Definition: style_parser:1363
tools::snpf
int snpf(char *a_s, size_t a_n, const char *a_fmt,...)
Definition: snpf:27
tools::sg::s_font_pixmap
const std::string & s_font_pixmap()
Definition: strings:53
tools::sg::style_parser::m_pickable
bool m_pickable
Definition: style_parser:1399
tools::sg::style_parser::copy
void copy(const style_parser &a_from)
Definition: style_parser:148
tools::sg::style_parser::m_color
colorf m_color
Definition: style_parser:1352
tools::sg::style_parser::m_hatching
sg::hatching_policy m_hatching
Definition: style_parser:1373
tools::sg::style_parser::m_width
float m_width
Definition: style_parser:1355
tools::sg::sline_pattern
bool sline_pattern(const std::string &a_s, lpat &aPattern)
Definition: senum:276
tools::sg::style_parser::m_highlight_color
colorf m_highlight_color
Definition: style_parser:1353
tools::sg::style_parser::font
const std::string & font() const
Definition: style_parser:549
tools::sg::style_parser::reset
virtual void reset()
Definition: style_parser:260
tools::sg::lpat
unsigned short lpat
Definition: lpat:10
tools::sg::style_parser::m_pattern
lpat m_pattern
Definition: style_parser:1361
tools::sg::font_outline
@ font_outline
Definition: enums:92
tools::sg::style_parser::check_uint
static bool check_uint(const std::string &a_w, const std::string &a_s, std::ostream &a_out, unsigned int &a_v)
Definition: style_parser:1325
tools::sg::style_parser::m_back_shadow
float m_back_shadow
Definition: style_parser:1379
tools::sg::encoding_none
const std::string & encoding_none()
Definition: strings:38
tools::sg::style_parser::m_front_face
winding_type m_front_face
Definition: style_parser:1394
tools::sg::style_parser::m_vjust
sg::vjust m_vjust
Definition: style_parser:1396
tools::sg::style_parser::m_scale
float m_scale
Definition: style_parser:1382
tools::to
std::vector< std::string > to(int a_argc, char **a_argv)
Definition: args:507
tools::sg::style_parser::m_strip_width
float m_strip_width
Definition: style_parser:1384
tools::sg::style_parser::m_color_mapping
std::string m_color_mapping
Definition: style_parser:1391
tools::sg::bottom
@ bottom
Definition: enums:80
tools::sg::smarker_style
bool smarker_style(const std::string &a_s, marker_style &a_v)
Definition: senum:107
tools::sg::hatching_none
@ hatching_none
Definition: enums:67
tools::sg::painting_uniform
@ painting_uniform
Definition: enums:58
tools::words
void words(const std::string &a_string, const std::string &a_sep, bool a_take_empty, std::vector< std::string > &a_words, bool a_clear=true)
Definition: words:12
tools::sg::style_parser::m_hinting
bool m_hinting
Definition: style_parser:1370
tools::sg::style_parser::check_bool
static bool check_bool(const std::string &a_w, const std::string &a_s, std::ostream &a_out, bool &a_v)
Definition: style_parser:1299
tools::sg::shatching_policy
bool shatching_policy(const std::string &a_s, hatching_policy &a_v)
Definition: senum:222
tools::vec4::set_value
void set_value(const T &a0, const T &a1, const T &a2, const T &a3)
Definition: vec4:100
tools::sg::style_parser::m_coloring
std::string m_coloring
Definition: style_parser:1397
tools::sg::area_solid
@ area_solid
Definition: enums:43
tools::sg::style_parser::m_font
std::string m_font
Definition: style_parser:1375
tools::sg::style_parser::m_editable
bool m_editable
Definition: style_parser:1388
tools::sg::style_parser::m_angle
float m_angle
Definition: style_parser:1381
tools::sg::style_parser::m_font_size
float m_font_size
Definition: style_parser:1359
tools::sg::style_parser::m_cut
std::string m_cut
Definition: style_parser:1371
tools::sg::line_solid
@ line_solid
Definition: enums:11
tools::sg::style_parser::m_bar_width
float m_bar_width
Definition: style_parser:1387
tools::sg::style_parser::m_back_color
colorf m_back_color
Definition: style_parser:1354
tools::sg::style_parser::m_bar_offset
float m_bar_offset
Definition: style_parser:1386
tools::sg::style_parser::m_visible
bool m_visible
Definition: style_parser:1385
tools::sg::s_font_filled
const std::string & s_font_filled()
Definition: strings:52
tools_vforcit
#define tools_vforcit(a__T, a__v, a__it)
Definition: forit:7
tools::sg::font_filled
@ font_filled
Definition: enums:93
tools::sg::to_ulong
bool to_ulong(const std::string &a_s, unsigned long &a_v)
Definition: style_colormap:538
tools::sg::style_parser::m_enforced
bool m_enforced
Definition: style_parser:1392
tools::sg::style_parser::m_translation
vec3f m_translation
Definition: style_parser:1393
tools::sg::s_font_outline
const std::string & s_font_outline()
Definition: strings:51
tools::sg::style_parser::m_hjust
sg::hjust m_hjust
Definition: style_parser:1395
tools::sg::style_parser::check_2
static bool check_2(size_t a_n, const std::string &a_s, const std::string &a_line, std::ostream &a_out)
Definition: style_parser:1285
tools::sg::style_parser::m_area_style
sg::area_style m_area_style
Definition: style_parser:1364
tools::sg::svjust
bool svjust(const std::string &a_s, vjust &a_v)
Definition: senum:57
tools::sg::style_parser::m_options
std::string m_options
Definition: style_parser:1390
tools::sg::sprojection_type
bool sprojection_type(const std::string &a_s, projection_type &a_v)
Definition: senum:255
tools::sg::style_parser::m_automated
bool m_automated
Definition: style_parser:1389
tools::sg::style_parser::m_title
std::string m_title
Definition: style_parser:1398