// Copyright (C) 2010, Guy Barrand. All rights reserved. // See the file tools.license for terms. #ifndef tools_sg_senum #define tools_sg_senum #include "enums" #include "lpat" #include #include namespace tools { namespace sg { typedef struct {char string[32];hjust value;} hjust_rec; inline const hjust_rec* hjust_recs(unsigned int& a_num){ static const hjust_rec list[] = { //read only static, then ok. {"left", left}, {"center", center}, {"right", right} }; a_num = sizeof(list)/sizeof(list[0]); return list; } inline bool shjust(const std::string& a_s,hjust& a_v){ unsigned int number; const hjust_rec* list = hjust_recs(number); for(unsigned int count=0;count& a_v){ a_v.clear(); unsigned int number; const marker_style_rec* list = marker_style_recs(number); for(unsigned int count=0;count& a_v){ a_v.clear(); unsigned int number; const painting_policy_rec* list = painting_policy_recsList(number); for(unsigned int count=0;count