|
| ToCSVVisitor (char delimiter=';', bool withHeader=true, const std::map< uint32_t, bool > &mask={}) noexcept |
|
std::string | csv () const noexcept |
|
void | clear () noexcept |
|
void | preVisit (int32_t id, const std::string &shortName, const std::string &longName) noexcept |
|
void | postVisit () noexcept |
|
void | visit (uint32_t id, std::string &&typeName, std::string &&name, bool &v) noexcept |
|
void | visit (uint32_t id, std::string &&typeName, std::string &&name, char &v) noexcept |
|
void | visit (uint32_t id, std::string &&typeName, std::string &&name, int8_t &v) noexcept |
|
void | visit (uint32_t id, std::string &&typeName, std::string &&name, uint8_t &v) noexcept |
|
void | visit (uint32_t id, std::string &&typeName, std::string &&name, int16_t &v) noexcept |
|
void | visit (uint32_t id, std::string &&typeName, std::string &&name, uint16_t &v) noexcept |
|
void | visit (uint32_t id, std::string &&typeName, std::string &&name, int32_t &v) noexcept |
|
void | visit (uint32_t id, std::string &&typeName, std::string &&name, uint32_t &v) noexcept |
|
void | visit (uint32_t id, std::string &&typeName, std::string &&name, int64_t &v) noexcept |
|
void | visit (uint32_t id, std::string &&typeName, std::string &&name, uint64_t &v) noexcept |
|
void | visit (uint32_t id, std::string &&typeName, std::string &&name, float &v) noexcept |
|
void | visit (uint32_t id, std::string &&typeName, std::string &&name, double &v) noexcept |
|
void | visit (uint32_t id, std::string &&typeName, std::string &&name, std::string &v) noexcept |
|
template<typename T > |
void | visit (uint32_t &id, std::string &&typeName, std::string &&name, T &value) noexcept |
|
This class provides a visitor to transform a message into CSV with user-specified delimiters and optional column headers:
MyMessage msg;
std::cout <<
csv.csv() << std::endl;
Subsequent use of this visitor will append the data (please keep in mind to not change the visited messages in between as the generated CSV data will be messed up otherwise).