12 #include "generated/logTypes.hpp"
21 const std::string & memberName
47 std::cerr <<
"Missing logMemberAccessor case entry for " << ec <<
":" << memberName <<
"\n";
79 case valTypes::String:
94 case valTypes::UShort:
106 case valTypes::ULong:
109 case valTypes::Float:
112 case valTypes::Double:
115 case valTypes::Vector_Bool:
118 case valTypes::Vector_Float:
148 std::cerr << __FILE__ <<
" " << __LINE__ <<
" valueString returned invalid value\n";
157 std::cerr << __FILE__ <<
" " << __LINE__ <<
" valueNumber returned invalid value\n";
179 return std::string(str);
186 std::cerr <<
"getLogStateVal returned error: " << __FILE__ <<
" " << __LINE__ <<
"\n";
190 return std::string(str);
192 case valTypes::UChar:
197 return std::string(str);
199 case valTypes::Short:
204 return std::string(str);
206 case valTypes::UShort:
211 return std::string(str);
218 return std::string(str);
225 return std::string(str);
232 return std::string(str);
234 case valTypes::ULong:
239 return std::string(str);
241 case valTypes::LongLong:
246 return std::string(str);
248 case valTypes::ULongLong:
250 unsigned long long val;
253 return std::string(str);
255 case valTypes::Float:
260 return std::string(str);
262 case valTypes::Double:
267 return std::string(str);
269 case valTypes::Vector_Bool:
271 std::vector<bool> val;
274 if(val.size() == 0)
return "";
278 for(
size_t n = 0; n < val.size()-1; ++n)
280 snprintf(str,
sizeof(str),
m_spec.
format.c_str(), (
int) val[n]);
285 snprintf(str,
sizeof(str),
m_spec.
format.c_str(), (
int) val.back());
290 case valTypes::Vector_Float:
292 std::vector<float> val;
295 if(val.size() == 0)
return "";
299 for(
size_t n = 0; n < val.size()-1; ++n)
301 snprintf(str,
sizeof(str),
m_spec.
format.c_str(), val[n]);
306 snprintf(str,
sizeof(str),
m_spec.
format.c_str(), val.back());
324 return std::string(str);
331 return std::string(str);
333 case valTypes::UChar:
338 return std::string(str);
340 case valTypes::Short:
345 return std::string(str);
347 case valTypes::UShort:
352 return std::string(str);
359 return std::string(str);
366 return std::string(str);
373 return std::string(str);
375 case valTypes::ULong:
380 return std::string(str);
382 case valTypes::LongLong:
387 return std::string(str);
389 case valTypes::ULongLong:
391 unsigned long long val;
394 return std::string(str);
396 case valTypes::Float:
401 return std::string(str);
403 case valTypes::Double:
408 return std::string(str);
429 std::cerr <<
"getLogStateVal returned error " << __FILE__ <<
" " << __LINE__ <<
"\n";
432 std::cerr << __FILE__ <<
" " << __LINE__ <<
"\n";
441 std::cerr <<
"String type specified as something other than state\n";
452 std::cerr << __FILE__ <<
" " << __LINE__ <<
"\n";
455 std::string vstr =
value(lm, stime, atime);
458 std::cerr << __FILE__ <<
" " << __LINE__ <<
"\n";
468 keyw += std::string(9-keyw.size(),
' ');
478 std::cerr <<
"got invalid value: " << __FILE__ <<
" " << __LINE__ <<
"\n";
uint16_t eventCodeT
The type of an event code (16-bit unsigned int).
int getLogStateVal(valT &val, logMap &lm, const std::string &appName, flatlogs::eventCodeT ev, const flatlogs::timespecX &stime, const flatlogs::timespecX &atime, valT(*getter)(void *), char **hint=0)
logMetaDetail logMemberAccessor(flatlogs::eventCodeT ec, const std::string &memberName)
int getLogContVal(valT &val, logMap &lm, const std::string &appName, flatlogs::eventCodeT ev, const flatlogs::timespecX &stime, const flatlogs::timespecX &atime, valT(*getter)(void *), char **hint=0)
Map of log entries by application name, mapping both to files and to loaded buffers.
static const flatlogs::eventCodeT eventCode
The event code.
static logMetaDetail getAccessor(const std::string &member)
Get pointer to the accessor for a member by name.
static logMetaDetail getAccessor(const std::string &member)
Get the logMetaDetail for a member by name.
static const flatlogs::eventCodeT eventCode
The event code.
static const flatlogs::eventCodeT eventCode
The event code.
static logMetaDetail getAccessor(const std::string &member)
Get the logMetaDetail for a member by name.
static logMetaDetail getAccessor(const std::string &member)
Get the logMetaDetail for a member by name.
static const flatlogs::eventCodeT eventCode
The event code.
static logMetaDetail getAccessor(const std::string &member)
Get the logMetaDetail for a member by name.
static const flatlogs::eventCodeT eventCode
The event code.
static const flatlogs::eventCodeT eventCode
The event code.
static logMetaDetail getAccessor(const std::string &member)
Get the logMetaDetail for a member by name.
static logMetaDetail getAccessor(const std::string &member)
Get the logMetaDetail for a member by name.
static const flatlogs::eventCodeT eventCode
The event code.
static logMetaDetail getAccessor(const std::string &member)
Get the logMetaDetail for a member by name.
static const flatlogs::eventCodeT eventCode
The event code.
static logMetaDetail getAccessor(const std::string &member)
Get the logMetaDetail for a member by name.
static const flatlogs::eventCodeT eventCode
The event code.
static const flatlogs::eventCodeT eventCode
The event code.
static logMetaDetail getAccessor(const std::string &member)
Get the logMetaDetail for a member by name.
A fixed-width timespec structure.