|
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) |
|
Definition at line 20 of file style_parser.
◆ style_parser() [1/2]
tools::sg::style_parser::style_parser |
( |
| ) |
|
|
inline |
Definition at line 25 of file style_parser.
76 mem::increment(s_class().c_str());
◆ ~style_parser()
virtual tools::sg::style_parser::~style_parser |
( |
| ) |
|
|
inlinevirtual |
Definition at line 80 of file style_parser.
82 mem::decrement(s_class().c_str());
◆ style_parser() [2/2]
tools::sg::style_parser::style_parser |
( |
const style_parser & |
a_from | ) |
|
|
inline |
Definition at line 86 of file style_parser.
137 mem::increment(s_class().c_str());
◆ angle() [1/2]
float tools::sg::style_parser::angle |
( |
| ) |
const |
|
inline |
◆ angle() [2/2]
void tools::sg::style_parser::angle |
( |
float |
a_v | ) |
|
|
inline |
◆ area_style() [1/2]
◆ area_style() [2/2]
◆ automated() [1/2]
bool tools::sg::style_parser::automated |
( |
| ) |
const |
|
inline |
◆ automated() [2/2]
void tools::sg::style_parser::automated |
( |
bool |
a_v | ) |
|
|
inline |
◆ back_color() [1/2]
colorf tools::sg::style_parser::back_color |
( |
| ) |
const |
|
inline |
◆ back_color() [2/2]
void tools::sg::style_parser::back_color |
( |
const colorf & |
a_v | ) |
|
|
inline |
◆ back_shadow() [1/2]
float tools::sg::style_parser::back_shadow |
( |
| ) |
const |
|
inline |
◆ back_shadow() [2/2]
void tools::sg::style_parser::back_shadow |
( |
float |
a_v | ) |
|
|
inline |
◆ bar_offset() [1/2]
float tools::sg::style_parser::bar_offset |
( |
| ) |
const |
|
inline |
◆ bar_offset() [2/2]
void tools::sg::style_parser::bar_offset |
( |
float |
a_v | ) |
|
|
inline |
◆ bar_width() [1/2]
float tools::sg::style_parser::bar_width |
( |
| ) |
const |
|
inline |
◆ bar_width() [2/2]
void tools::sg::style_parser::bar_width |
( |
float |
a_v | ) |
|
|
inline |
◆ 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.
1289 a_out <<
"style_parser::parse :"
1290 <<
" in " << sout(a_s)
1291 <<
" : " << sout(a_line)
1292 <<
" has a bad word count (two expected)."
◆ 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.
1302 a_out <<
"style_parser::parse :"
1303 <<
" in " << sout(a_s)
1304 <<
" : " << sout(a_w)
1305 <<
" not a boolean."
◆ 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.
1340 if(!to<float>(a_w,a_v)){
1341 a_out <<
"style_parser::parse :"
1342 <<
" in " << sout(a_s)
1343 <<
" : " << sout(a_w)
◆ 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.
1314 if(!to<int>(a_w,a_v)){
1315 a_out <<
"style_parser::parse :"
1316 <<
" in " << sout(a_s)
1317 <<
" : " << sout(a_w)
◆ 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.
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."
◆ color() [1/2]
colorf tools::sg::style_parser::color |
( |
| ) |
const |
|
inline |
◆ color() [2/2]
void tools::sg::style_parser::color |
( |
const colorf & |
a_v | ) |
|
|
inline |
◆ color_mapping() [1/2]
const std::string& tools::sg::style_parser::color_mapping |
( |
| ) |
const |
|
inline |
◆ color_mapping() [2/2]
void tools::sg::style_parser::color_mapping |
( |
const std::string & |
a_v | ) |
|
|
inline |
◆ coloring() [1/2]
const std::string& tools::sg::style_parser::coloring |
( |
| ) |
const |
|
inline |
◆ coloring() [2/2]
void tools::sg::style_parser::coloring |
( |
const std::string & |
a_v | ) |
|
|
inline |
◆ copy()
void tools::sg::style_parser::copy |
( |
const style_parser & |
a_from | ) |
|
|
inline |
◆ cut() [1/2]
const std::string& tools::sg::style_parser::cut |
( |
| ) |
const |
|
inline |
◆ cut() [2/2]
void tools::sg::style_parser::cut |
( |
const std::string & |
a_v | ) |
|
|
inline |
◆ divisions() [1/2]
int tools::sg::style_parser::divisions |
( |
| ) |
const |
|
inline |
◆ divisions() [2/2]
void tools::sg::style_parser::divisions |
( |
int |
a_v | ) |
|
|
inline |
◆ editable() [1/2]
bool tools::sg::style_parser::editable |
( |
| ) |
const |
|
inline |
◆ editable() [2/2]
void tools::sg::style_parser::editable |
( |
bool |
a_v | ) |
|
|
inline |
◆ encoding() [1/2]
const std::string& tools::sg::style_parser::encoding |
( |
| ) |
const |
|
inline |
◆ encoding() [2/2]
void tools::sg::style_parser::encoding |
( |
const std::string & |
a_v | ) |
|
|
inline |
◆ enforced() [1/2]
bool tools::sg::style_parser::enforced |
( |
| ) |
const |
|
inline |
◆ enforced() [2/2]
void tools::sg::style_parser::enforced |
( |
bool |
a_v | ) |
|
|
inline |
◆ equal()
bool tools::sg::style_parser::equal |
( |
const style_parser & |
a_from | ) |
|
|
inline |
Definition at line 199 of file style_parser.
200 if(
m_width!=a_from.m_width)
return false;
206 if(
m_pattern!=a_from.m_pattern)
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;
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;
224 if(
m_visible!=a_from.m_visible)
return false;
227 if(
m_editable!=a_from.m_editable)
return false;
229 if(
m_enforced!=a_from.m_enforced)
return false;
232 if(
m_color!=a_from.m_color)
return false;
237 if(
m_modeling!=a_from.m_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;
250 if(
m_hjust!=a_from.m_hjust)
return false;
251 if(
m_vjust!=a_from.m_vjust)
return false;
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;
◆ font() [1/2]
const std::string& tools::sg::style_parser::font |
( |
| ) |
const |
|
inline |
◆ font() [2/2]
void tools::sg::style_parser::font |
( |
const std::string & |
a_v | ) |
|
|
inline |
◆ font_modeling() [1/2]
◆ font_modeling() [2/2]
◆ font_size() [1/2]
float tools::sg::style_parser::font_size |
( |
| ) |
const |
|
inline |
◆ font_size() [2/2]
void tools::sg::style_parser::font_size |
( |
float |
a_v | ) |
|
|
inline |
◆ front_face() [1/2]
◆ front_face() [2/2]
void tools::sg::style_parser::front_face |
( |
winding_type |
a_v | ) |
|
|
inline |
◆ hatching() [1/2]
◆ hatching() [2/2]
◆ highlight_color() [1/2]
colorf tools::sg::style_parser::highlight_color |
( |
| ) |
const |
|
inline |
◆ highlight_color() [2/2]
void tools::sg::style_parser::highlight_color |
( |
const colorf & |
a_v | ) |
|
|
inline |
◆ hinting() [1/2]
bool tools::sg::style_parser::hinting |
( |
| ) |
const |
|
inline |
◆ hinting() [2/2]
void tools::sg::style_parser::hinting |
( |
bool |
a_v | ) |
|
|
inline |
◆ hjust() [1/2]
sg::hjust tools::sg::style_parser::hjust |
( |
| ) |
const |
|
inline |
◆ hjust() [2/2]
void tools::sg::style_parser::hjust |
( |
sg::hjust |
a_v | ) |
|
|
inline |
◆ light_model() [1/2]
const std::string& tools::sg::style_parser::light_model |
( |
| ) |
const |
|
inline |
◆ light_model() [2/2]
void tools::sg::style_parser::light_model |
( |
const std::string & |
a_v | ) |
|
|
inline |
◆ line_pattern() [1/2]
lpat tools::sg::style_parser::line_pattern |
( |
| ) |
const |
|
inline |
◆ line_pattern() [2/2]
void tools::sg::style_parser::line_pattern |
( |
lpat |
a_v | ) |
|
|
inline |
◆ line_width() [1/2]
float tools::sg::style_parser::line_width |
( |
| ) |
const |
|
inline |
◆ line_width() [2/2]
void tools::sg::style_parser::line_width |
( |
float |
a_v | ) |
|
|
inline |
◆ marker_size() [1/2]
float tools::sg::style_parser::marker_size |
( |
| ) |
const |
|
inline |
◆ marker_size() [2/2]
void tools::sg::style_parser::marker_size |
( |
float |
a_v | ) |
|
|
inline |
◆ marker_style() [1/2]
◆ marker_style() [2/2]
◆ modeling() [1/2]
const std::string& tools::sg::style_parser::modeling |
( |
| ) |
const |
|
inline |
◆ modeling() [2/2]
void tools::sg::style_parser::modeling |
( |
const std::string & |
a_v | ) |
|
|
inline |
◆ multi_node_limit() [1/2]
int tools::sg::style_parser::multi_node_limit |
( |
| ) |
const |
|
inline |
◆ multi_node_limit() [2/2]
void tools::sg::style_parser::multi_node_limit |
( |
int |
a_v | ) |
|
|
inline |
◆ no_limit()
static int tools::sg::style_parser::no_limit |
( |
| ) |
|
|
inlinestatic |
◆ offset() [1/2]
float tools::sg::style_parser::offset |
( |
| ) |
const |
|
inline |
◆ offset() [2/2]
void tools::sg::style_parser::offset |
( |
float |
a_v | ) |
|
|
inline |
◆ operator=()
◆ options() [1/2]
const std::string& tools::sg::style_parser::options |
( |
| ) |
const |
|
inline |
◆ options() [2/2]
void tools::sg::style_parser::options |
( |
const std::string & |
a_v | ) |
|
|
inline |
◆ painting() [1/2]
◆ painting() [2/2]
◆ 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.
627 std::vector<std::string>
lines;
631 const std::string& line = *it;
632 if(line.empty())
continue;
637 std::vector<std::string> ws;
638 words(line,
" ",
false,ws);
639 size_t wordn = ws.size();
641 a_out <<
"style_parser::parse :"
642 <<
" in " << sout(a_s)
643 <<
" : " << sout(line)
644 <<
" has a bad word count (at least two expected)."
648 const std::string& word0 = ws[0];
651 const std::string& word1 = ws[1];
653 a_out <<
"style_parser::parse :"
654 <<
" in " << sout(a_s)
655 <<
" : " << sout(word1)
660 }
else if (wordn==4) {
661 const std::string& rs = ws[1];
663 if(!to<float>(rs,r)) {
664 a_out <<
"style_parser::parse :"
665 <<
" in " << sout(a_s)
671 const std::string& gs = ws[2];
673 if(!to<float>(gs,g)) {
674 a_out <<
"style_parser::parse :"
675 <<
" in " << sout(a_s)
681 const std::string& bs = ws[3];
683 if(!to<float>(bs,b)) {
684 a_out <<
"style_parser::parse :"
685 <<
" in " << sout(a_s)
693 }
else if (wordn==5) {
694 const std::string& rs = ws[1];
696 if(!to<float>(rs,r)) {
697 a_out <<
"style_parser::parse :"
698 <<
" in " << sout(a_s)
704 const std::string& gs = ws[2];
706 if(!to<float>(gs,g)) {
707 a_out <<
"style_parser::parse :"
708 <<
" in " << sout(a_s)
714 const std::string& bs = ws[3];
716 if(!to<float>(bs,b)) {
717 a_out <<
"style_parser::parse :"
718 <<
" in " << sout(a_s)
724 const std::string& as = ws[4];
726 if(!to<float>(as,a)) {
727 a_out <<
"style_parser::parse :"
728 <<
" in " << sout(a_s)
737 a_out <<
"style_parser::parse :"
738 <<
" in " << sout(a_s)
739 <<
" : " << sout(line)
740 <<
" has a bad word count (two or four expected)."
745 }
else if(word0==
"highlight_color") {
747 const std::string& word1 = ws[1];
749 a_out <<
"style_parser::parse :"
750 <<
" in " << sout(a_s)
751 <<
" : " << sout(word1)
756 }
else if (wordn==4) {
757 const std::string& rs = ws[1];
759 if(!to<float>(rs,r)) {
760 a_out <<
"style_parser::parse :"
761 <<
" in " << sout(a_s)
767 const std::string& gs = ws[2];
769 if(!to<float>(gs,g)) {
770 a_out <<
"style_parser::parse :"
771 <<
" in " << sout(a_s)
777 const std::string& bs = ws[3];
779 if(!to<float>(bs,b)) {
780 a_out <<
"style_parser::parse :"
781 <<
" in " << sout(a_s)
789 }
else if (wordn==5) {
790 const std::string& rs = ws[1];
792 if(!to<float>(rs,r)) {
793 a_out <<
"style_parser::parse :"
794 <<
" in " << sout(a_s)
800 const std::string& gs = ws[2];
802 if(!to<float>(gs,g)) {
803 a_out <<
"style_parser::parse :"
804 <<
" in " << sout(a_s)
810 const std::string& bs = ws[3];
812 if(!to<float>(bs,b)) {
813 a_out <<
"style_parser::parse :"
814 <<
" in " << sout(a_s)
820 const std::string& as = ws[4];
822 if(!to<float>(as,a)) {
823 a_out <<
"style_parser::parse :"
824 <<
" in " << sout(a_s)
833 a_out <<
"style_parser::parse :"
834 <<
" in " << sout(a_s)
835 <<
" : " << sout(line)
836 <<
" has a bad word count (two or four expected)."
841 }
else if(word0==
"back_color") {
843 const std::string& word1 = ws[1];
845 a_out <<
"style_parser::parse :"
846 <<
" in " << sout(a_s)
847 <<
" : " << sout(word1)
852 }
else if (wordn==4) {
853 const std::string& rs = ws[1];
855 if(!to<float>(rs,r)) {
856 a_out <<
"style_parser::parse :"
857 <<
" in " << sout(a_s)
863 const std::string& gs = ws[2];
865 if(!to<float>(gs,g)) {
866 a_out <<
"style_parser::parse :"
867 <<
" in " << sout(a_s)
873 const std::string& bs = ws[3];
875 if(!to<float>(bs,b)) {
876 a_out <<
"style_parser::parse :"
877 <<
" in " << sout(a_s)
885 }
else if (wordn==5) {
886 const std::string& rs = ws[1];
888 if(!to<float>(rs,r)) {
889 a_out <<
"style_parser::parse :"
890 <<
" in " << sout(a_s)
896 const std::string& gs = ws[2];
898 if(!to<float>(gs,g)) {
899 a_out <<
"style_parser::parse :"
900 <<
" in " << sout(a_s)
906 const std::string& bs = ws[3];
908 if(!to<float>(bs,b)) {
909 a_out <<
"style_parser::parse :"
910 <<
" in " << sout(a_s)
916 const std::string& as = ws[4];
918 if(!to<float>(as,a)) {
919 a_out <<
"style_parser::parse :"
920 <<
" in " << sout(a_s)
929 a_out <<
"style_parser::parse :"
930 <<
" in " << sout(a_s)
931 <<
" : " << sout(line)
932 <<
" has a bad word count (two or four expected)."
937 }
else if(word0==
"pattern") {
938 if(!
check_2(wordn,a_s,line,a_out))
return false;
939 const std::string& word1 = ws[1];
943 a_out <<
"style_parser::parse :"
944 <<
" in " << sout(a_s)
945 <<
" : " << sout(word1)
946 <<
" not a line pattern."
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];
959 a_out <<
"style_parser::parse :"
960 <<
" in " << sout(a_s)
961 <<
" : " << sout(word1)
962 <<
" not a line pattern."
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];
972 a_out <<
"style_parser::parse :"
973 <<
" in " << sout(a_s)
974 <<
" : " << sout(word1)
975 <<
" not a marker_style."
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];
983 a_out <<
"style_parser::parse :"
984 <<
" in " << sout(a_s)
985 <<
" : " << sout(word1)
986 <<
" not a area_style."
990 }
else if(word0==
"modeling") {
991 if(!
check_2(wordn,a_s,line,a_out))
return false;
993 }
else if(word0==
"light_model") {
994 if(!
check_2(wordn,a_s,line,a_out))
return false;
996 }
else if(word0==
"tick_modeling") {
997 if(!
check_2(wordn,a_s,line,a_out))
return false;
999 }
else if(word0==
"encoding") {
1000 if(!
check_2(wordn,a_s,line,a_out))
return false;
1002 }
else if(word0==
"smoothing") {
1003 if(!
check_2(wordn,a_s,line,a_out))
return false;
1005 if(!
check_bool(ws[1],a_s,a_out,value))
return false;
1007 }
else if(word0==
"hinting") {
1008 if(!
check_2(wordn,a_s,line,a_out))
return false;
1010 if(!
check_bool(ws[1],a_s,a_out,value))
return false;
1012 }
else if(word0==
"enforced") {
1013 if(!
check_2(wordn,a_s,line,a_out))
return false;
1015 if(!
check_bool(ws[1],a_s,a_out,value))
return false;
1017 }
else if(word0==
"cut") {
1019 for(
unsigned int wordi=1;wordi<wordn;wordi++) {
1020 if(wordi!=1)
m_cut +=
" ";
1023 }
else if(word0==
"options") {
1025 for(
unsigned int wordi=1;wordi<wordn;wordi++) {
1029 }
else if(word0==
"color_mapping") {
1031 for(
unsigned int wordi=1;wordi<wordn;wordi++) {
1035 }
else if(word0==
"painting") {
1036 if(!
check_2(wordn,a_s,line,a_out))
return false;
1038 a_out <<
"style_parser::parse :"
1039 <<
" in " << sout(a_s)
1040 <<
" : " << sout(ws[1])
1041 <<
" not a painting_policy."
1045 }
else if(word0==
"hatching") {
1046 if(!
check_2(wordn,a_s,line,a_out))
return false;
1048 a_out <<
"style_parser::parse :"
1049 <<
" in " << sout(a_s)
1050 <<
" : " << sout(ws[1])
1051 <<
" not a hatching_policy."
1055 }
else if(word0==
"projection") {
1056 if(!
check_2(wordn,a_s,line,a_out))
return false;
1058 a_out <<
"style_parser::parse :"
1059 <<
" in " << sout(a_s)
1060 <<
" : " << sout(ws[1])
1061 <<
" not a projection_type."
1065 }
else if(word0==
"font") {
1066 if(!
check_2(wordn,a_s,line,a_out))
return false;
1068 }
else if(word0==
"width") {
1069 if(!
check_2(wordn,a_s,line,a_out))
return false;
1071 if(!
check_float(ws[1],a_s,a_out,value))
return false;
1073 }
else if(word0==
"line_width") {
1074 if(!
check_2(wordn,a_s,line,a_out))
return false;
1076 if(!
check_float(ws[1],a_s,a_out,value))
return false;
1078 }
else if(word0==
"marker_size") {
1079 if(!
check_2(wordn,a_s,line,a_out))
return false;
1081 if(!
check_float(ws[1],a_s,a_out,value))
return false;
1083 }
else if(word0==
"point_size") {
1084 if(!
check_2(wordn,a_s,line,a_out))
return false;
1086 if(!
check_float(ws[1],a_s,a_out,value))
return false;
1088 }
else if(word0==
"font_size") {
1089 if(!
check_2(wordn,a_s,line,a_out))
return false;
1091 if(!
check_float(ws[1],a_s,a_out,value))
return false;
1093 }
else if(word0==
"font_modeling") {
1094 if(!
check_2(wordn,a_s,line,a_out))
return false;
1099 a_out <<
"style_parser::parse :"
1100 <<
" in " << sout(a_s)
1101 <<
" : " << sout(ws[1])
1102 <<
" not a font_modeling."
1106 }
else if(word0==
"back_shadow") {
1107 if(!
check_2(wordn,a_s,line,a_out))
return false;
1109 if(!
check_float(ws[1],a_s,a_out,value))
return false;
1110 if(value<0.F) value = 0.F;
1112 }
else if(word0==
"multi_node_limit") {
1113 if(!
check_2(wordn,a_s,line,a_out))
return false;
1115 if(!
check_int(ws[1],a_s,a_out,value))
return false;
1117 }
else if(word0==
"divisions") {
1118 if(!
check_2(wordn,a_s,line,a_out))
return false;
1120 if(!
check_int(ws[1],a_s,a_out,value))
return false;
1122 }
else if(word0==
"rotation_steps") {
1123 if(!
check_2(wordn,a_s,line,a_out))
return false;
1125 if(!
check_uint(ws[1],a_s,a_out,value))
return false;
1127 }
else if(word0==
"angle") {
1128 if(!
check_2(wordn,a_s,line,a_out))
return false;
1130 if(!
check_float(ws[1],a_s,a_out,value))
return false;
1132 }
else if(word0==
"scale") {
1133 if(!
check_2(wordn,a_s,line,a_out))
return false;
1135 if(!
check_float(ws[1],a_s,a_out,value))
return false;
1137 }
else if(word0==
"offset") {
1138 if(!
check_2(wordn,a_s,line,a_out))
return false;
1140 if(!
check_float(ws[1],a_s,a_out,value))
return false;
1142 }
else if(word0==
"strip_width") {
1143 if(!
check_2(wordn,a_s,line,a_out))
return false;
1145 if(!
check_float(ws[1],a_s,a_out,value))
return false;
1147 }
else if(word0==
"spacing") {
1148 if(!
check_2(wordn,a_s,line,a_out))
return false;
1150 if(!
check_float(ws[1],a_s,a_out,value))
return false;
1152 }
else if(word0==
"visible") {
1153 if(!
check_2(wordn,a_s,line,a_out))
return false;
1155 if(!
check_bool(ws[1],a_s,a_out,value))
return false;
1157 }
else if(word0==
"editable") {
1158 if(!
check_2(wordn,a_s,line,a_out))
return false;
1160 if(!
check_bool(ws[1],a_s,a_out,value))
return false;
1162 }
else if(word0==
"pickable") {
1163 if(!
check_2(wordn,a_s,line,a_out))
return false;
1165 if(!
check_bool(ws[1],a_s,a_out,value))
return false;
1167 }
else if(word0==
"automated") {
1168 if(!
check_2(wordn,a_s,line,a_out))
return false;
1170 if(!
check_bool(ws[1],a_s,a_out,value))
return false;
1172 }
else if(word0==
"bar_offset") {
1173 if(!
check_2(wordn,a_s,line,a_out))
return false;
1175 if(!
check_float(ws[1],a_s,a_out,value))
return false;
1177 }
else if(word0==
"bar_width") {
1178 if(!
check_2(wordn,a_s,line,a_out))
return false;
1180 if(!
check_float(ws[1],a_s,a_out,value))
return false;
1183 }
else if(word0==
"translation") {
1185 const std::string& sx = ws[1];
1187 if(!to<float>(sx,x)) {
1188 a_out <<
"style_parser::parse :"
1189 <<
" in " << sout(a_s)
1190 <<
" : " << sout(sx)
1195 const std::string& sy = ws[2];
1197 if(!to<float>(sy,y)) {
1198 a_out <<
"style_parser::parse :"
1199 <<
" in " << sout(a_s)
1200 <<
" : " << sout(sy)
1205 const std::string& sz = ws[3];
1207 if(!to<float>(sz,z)) {
1208 a_out <<
"style_parser::parse :"
1209 <<
" in " << sout(a_s)
1210 <<
" : " << sout(sz)
1217 a_out <<
"style_parser::parse :"
1218 <<
" in " << sout(a_s)
1219 <<
" has a bad word count (four expected)."
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];
1229 }
else if(word1==
"cw") {
1232 a_out <<
"style_parser::parse :"
1233 <<
" in " << sout(a_s)
1234 <<
" : " << sout(word1)
1235 <<
" not a winding type."
1240 }
else if(word0==
"hjust") {
1241 if(!
check_2(wordn,a_s,line,a_out))
return false;
1242 const std::string& word1 = ws[1];
1244 a_out <<
"style_parser::parse :"
1245 <<
" in " << sout(a_s)
1246 <<
" : " << sout(word1)
1252 }
else if(word0==
"vjust") {
1253 if(!
check_2(wordn,a_s,line,a_out))
return false;
1254 const std::string& word1 = ws[1];
1256 a_out <<
"style_parser::parse :"
1257 <<
" in " << sout(a_s)
1258 <<
" : " << sout(word1)
1264 }
else if(word0==
"coloring") {
1265 if(!
check_2(wordn,a_s,line,a_out))
return false;
1268 }
else if(word0==
"title") {
1269 if(!
check_2(wordn,a_s,line,a_out))
return false;
1273 a_out <<
"style_parser::parse :"
1274 <<
" in " << sout(a_s)
1275 <<
" : " << sout(word0)
◆ pattern() [1/2]
lpat tools::sg::style_parser::pattern |
( |
| ) |
const |
|
inline |
◆ pattern() [2/2]
void tools::sg::style_parser::pattern |
( |
lpat |
a_v | ) |
|
|
inline |
◆ pickable() [1/2]
bool tools::sg::style_parser::pickable |
( |
| ) |
const |
|
inline |
◆ pickable() [2/2]
void tools::sg::style_parser::pickable |
( |
bool |
a_v | ) |
|
|
inline |
◆ point_size() [1/2]
float tools::sg::style_parser::point_size |
( |
| ) |
const |
|
inline |
◆ point_size() [2/2]
void tools::sg::style_parser::point_size |
( |
float |
a_v | ) |
|
|
inline |
◆ projection() [1/2]
◆ projection() [2/2]
◆ reset()
virtual void tools::sg::style_parser::reset |
( |
| ) |
|
|
inlinevirtual |
◆ rotation_steps() [1/2]
unsigned int tools::sg::style_parser::rotation_steps |
( |
| ) |
const |
|
inline |
◆ rotation_steps() [2/2]
void tools::sg::style_parser::rotation_steps |
( |
unsigned int |
a_v | ) |
|
|
inline |
◆ scale() [1/2]
float tools::sg::style_parser::scale |
( |
| ) |
const |
|
inline |
◆ scale() [2/2]
void tools::sg::style_parser::scale |
( |
float |
a_v | ) |
|
|
inline |
◆ smoothing() [1/2]
bool tools::sg::style_parser::smoothing |
( |
| ) |
const |
|
inline |
◆ smoothing() [2/2]
void tools::sg::style_parser::smoothing |
( |
bool |
a_v | ) |
|
|
inline |
◆ spacing() [1/2]
float tools::sg::style_parser::spacing |
( |
| ) |
const |
|
inline |
◆ spacing() [2/2]
void tools::sg::style_parser::spacing |
( |
float |
a_v | ) |
|
|
inline |
◆ strip_width() [1/2]
float tools::sg::style_parser::strip_width |
( |
| ) |
const |
|
inline |
◆ strip_width() [2/2]
void tools::sg::style_parser::strip_width |
( |
float |
a_v | ) |
|
|
inline |
◆ tick_modeling() [1/2]
const std::string& tools::sg::style_parser::tick_modeling |
( |
| ) |
const |
|
inline |
◆ tick_modeling() [2/2]
void tools::sg::style_parser::tick_modeling |
( |
const std::string & |
a_v | ) |
|
|
inline |
◆ title() [1/2]
const std::string& tools::sg::style_parser::title |
( |
| ) |
const |
|
inline |
◆ title() [2/2]
void tools::sg::style_parser::title |
( |
const std::string & |
a_v | ) |
|
|
inline |
◆ tos()
std::string tools::sg::style_parser::tos |
( |
| ) |
const |
|
inline |
Definition at line 311 of file style_parser.
315 highlight_color %g %g %g\n\
316 back_color %g %g %g\n\
324 multi_node_limit %d\n\
335 translation %g %g %g"
359 std::string lf(
"\n");
391 s +=
"marker_style ";
415 s +=
"tick_modeling ";
444 s +=
"font_modeling ";
448 s +=
"font_modeling ";
452 s +=
"font_modeling ";
461 s +=
"color_mapping ";
◆ translation() [1/2]
vec3f tools::sg::style_parser::translation |
( |
| ) |
const |
|
inline |
◆ translation() [2/2]
void tools::sg::style_parser::translation |
( |
const vec3f & |
a_v | ) |
|
|
inline |
◆ visible() [1/2]
bool tools::sg::style_parser::visible |
( |
| ) |
const |
|
inline |
◆ visible() [2/2]
void tools::sg::style_parser::visible |
( |
bool |
a_v | ) |
|
|
inline |
◆ vjust() [1/2]
sg::vjust tools::sg::style_parser::vjust |
( |
| ) |
const |
|
inline |
◆ vjust() [2/2]
void tools::sg::style_parser::vjust |
( |
sg::vjust |
a_v | ) |
|
|
inline |
◆ width() [1/2]
float tools::sg::style_parser::width |
( |
| ) |
const |
|
inline |
◆ width() [2/2]
void tools::sg::style_parser::width |
( |
float |
a_v | ) |
|
|
inline |
◆ m_angle
float tools::sg::style_parser::m_angle |
|
protected |
◆ m_area_style
◆ m_automated
bool tools::sg::style_parser::m_automated |
|
protected |
◆ m_back_color
colorf tools::sg::style_parser::m_back_color |
|
protected |
◆ m_back_shadow
float tools::sg::style_parser::m_back_shadow |
|
protected |
◆ m_bar_offset
float tools::sg::style_parser::m_bar_offset |
|
protected |
◆ m_bar_width
float tools::sg::style_parser::m_bar_width |
|
protected |
◆ m_color
colorf tools::sg::style_parser::m_color |
|
protected |
◆ m_color_mapping
std::string tools::sg::style_parser::m_color_mapping |
|
protected |
◆ m_coloring
std::string tools::sg::style_parser::m_coloring |
|
protected |
◆ m_cut
std::string tools::sg::style_parser::m_cut |
|
protected |
◆ m_divisions
int tools::sg::style_parser::m_divisions |
|
protected |
◆ m_editable
bool tools::sg::style_parser::m_editable |
|
protected |
◆ m_encoding
std::string tools::sg::style_parser::m_encoding |
|
protected |
◆ m_enforced
bool tools::sg::style_parser::m_enforced |
|
protected |
◆ m_font
std::string tools::sg::style_parser::m_font |
|
protected |
◆ m_font_modeling
◆ m_font_size
float tools::sg::style_parser::m_font_size |
|
protected |
◆ m_front_face
◆ m_hatching
◆ m_highlight_color
colorf tools::sg::style_parser::m_highlight_color |
|
protected |
◆ m_hinting
bool tools::sg::style_parser::m_hinting |
|
protected |
◆ m_hjust
◆ m_light_model
std::string tools::sg::style_parser::m_light_model |
|
protected |
◆ m_line_pattern
lpat tools::sg::style_parser::m_line_pattern |
|
protected |
◆ m_line_width
float tools::sg::style_parser::m_line_width |
|
protected |
◆ m_marker_size
float tools::sg::style_parser::m_marker_size |
|
protected |
◆ m_marker_style
◆ m_modeling
std::string tools::sg::style_parser::m_modeling |
|
protected |
◆ m_multi_node_limit
int tools::sg::style_parser::m_multi_node_limit |
|
protected |
◆ m_offset
float tools::sg::style_parser::m_offset |
|
protected |
◆ m_options
std::string tools::sg::style_parser::m_options |
|
protected |
◆ m_painting
◆ m_pattern
lpat tools::sg::style_parser::m_pattern |
|
protected |
◆ m_pickable
bool tools::sg::style_parser::m_pickable |
|
protected |
◆ m_point_size
float tools::sg::style_parser::m_point_size |
|
protected |
◆ m_projection
◆ m_rotation_steps
unsigned int tools::sg::style_parser::m_rotation_steps |
|
protected |
◆ m_scale
float tools::sg::style_parser::m_scale |
|
protected |
◆ m_smoothing
bool tools::sg::style_parser::m_smoothing |
|
protected |
◆ m_spacing
float tools::sg::style_parser::m_spacing |
|
protected |
◆ m_strip_width
float tools::sg::style_parser::m_strip_width |
|
protected |
◆ m_tick_modeling
std::string tools::sg::style_parser::m_tick_modeling |
|
protected |
◆ m_title
std::string tools::sg::style_parser::m_title |
|
protected |
◆ m_translation
vec3f tools::sg::style_parser::m_translation |
|
protected |
◆ m_visible
bool tools::sg::style_parser::m_visible |
|
protected |
◆ m_vjust
◆ m_width
float tools::sg::style_parser::m_width |
|
protected |
The documentation for this class was generated from the following file:
- /Users/barrand/private/dev/softinex/g4tools/g4tools/tools/sg/style_parser
#define tools_vforcit(a__T, a__v, a__it)