49 using Output = std::pair<std::pair<std::string, std::string>, std::ostream *>;
70 virtual void print(std::ostream& os) = 0;
96 virtual void print(std::ostream& os) { os <<
_obj; }
105 void print(std::ostream& os) { os <<
'"' <<
_obj <<
'"'; }
112 void print(std::ostream& os) { os <<
'\'' <<
_obj <<
'\''; }
115 using RealmMap = std::map<RealmObject *, std::string, RealmObject::less>;
120 using GroupMap = std::map<unsigned, struct MessageSpec>;
124 using TypeToCPP = std::map<FieldTrait::FieldType, std::pair<std::string, std::string>>;
141 : _name(name), _ftype(ftype), _dtype(
RealmBase::dt_set), _doffset(), _dvals(), _used() {}
146 std::for_each(_dvals->begin(), _dvals->end(), [](RealmMap::value_type& pp) {
delete pp.first; });
164 MessageSpec(
const std::string& name,
bool admin=
false) : _group_refcnt(), _hash(), _name(name), _is_admin(admin) {}
183 using Components = std::map<std::string, const XmlElement *>;
201 using CSMap = std::map<comp_str, std::string>;
219 std::ostringstream ostr;
220 ostr <<
"Error getting current directory (" << ::strerror(errno) <<
')';
228 if (!to || _chdir(to))
230 if (!to || ::chdir(to))
233 std::ostringstream ostr;
234 ostr <<
"Error changing to directory '" << (to ? to :
"(null)") <<
'\'';
236 ostr <<
" (" << ::strerror(errno) <<
')';
250 #endif // FIX8_F8C_HPP_
bool operator()(const RealmObject *p1, const RealmObject *p2) const
bool comp(const RealmObject *p1, const RealmObject *p2)
RealmBase::RealmType _dtype
T FindAttr(const std::string &what, const T defValue) const
friend std::ostream & operator<<(std::ostream &os, const MessageSpec &what)
static const TypeToCPP _typeToCPP
#define FIX8_MAX_FLD_LENGTH
MessageSpec(const std::string &name, bool admin=false)
Ctor.
FieldTrait::FieldType _ftype
std::map< comp_str, std::string > CSMap
std::map< std::string, const XmlElement * > Components
static const std::string _exts_ver[2]
virtual bool comp(const RealmObject *p1, const RealmObject *p2)=0
f8c internal message representation.
std::map< unsigned, struct MessageSpec > GroupMap
std::map< FieldTrait::FieldType, std::pair< std::string, std::string >> TypeToCPP
static const BaseTypeMap _baseTypeMap
static const std::string _exts[count]
int recover_line(const XmlElement &xf)
Domain range/set static metadata base class.
f8c character realm type.
virtual void print(std::ostream &os)
std::map< unsigned, struct FieldSpec > FieldSpecMap
A simple xml parser with Xpath style lookup.
f8c range or set domain realm.
RealmObject(bool isRange)
void print(std::ostream &os)
std::multiset< const FieldTrait *, FieldTrait::PosCompare > FieldTraitOrder
friend std::ostream & operator<<(std::ostream &os, RealmObject &what)
void print(std::ostream &os)
push_dir(const std::string &to)
char _cwd[FIX8_MAX_FLD_LENGTH]
std::pair< std::pair< std::string, std::string >, std::ostream * > Output
std::map< std::string, unsigned > FieldToNumMap
std::map< RealmObject *, std::string, RealmObject::less > RealmMap
TypedRealm(const T &from, bool isRange)
f8c internal field representation.
CharRealm(const char &from, bool isRange)
virtual ~MessageSpec()
Dtor.
std::map< const std::string, MessageSpec > MessageSpecMap
void chgdir(const char *to) const
static RealmObject * create(const std::string &from, FieldTrait::FieldType ftype, bool isRange=false)
virtual void print(std::ostream &os)=0
std::map< unsigned, CommonGroups > CommonGroupMap
std::map< std::string, FieldTrait::FieldType > BaseTypeMap
A collection of FieldTraits for a message. Which fields are required, which are present.
FieldSpec(const std::string &name, FieldTrait::FieldType ftype=FieldTrait::ft_untyped)
std::map< uint32_t, struct MessageSpec > CommonGroups
StringRealm(const std::string &from, bool isRange)