chrono::vehicle::ChJSONWriter Class Reference

Description

This is a helper class to generate serialized JSON messages that can be passed to/from Chrono.

The expectation the replciate class for this object should be used on the Chrono side

This works as follows:

  • The ChJSONWriter implements << operators that correspond to the types provided by rapidjson
  • The ChJSONWriter is responsible for interacting with rapidjson, generating JSON buffers that are suitable to be read on the other side

#include <ChExternalDriver.h>

Public Member Functions

ChJSONWriter & operator<< (bool v)
 
ChJSONWriter & operator<< (const int v)
 
ChJSONWriter & operator<< (const long int v)
 
ChJSONWriter & operator<< (const double v)
 
ChJSONWriter & operator<< (unsigned int v)
 
ChJSONWriter & operator<< (const char *v)
 
ChJSONWriter & operator<< (std::string &v)
 
ChJSONWriter & operator<< (const std::string &v)
 
ChJSONWriter & operator<< (unsigned long v)
 
ChJSONWriter & operator<< (unsigned long long v)
 
ChJSONWriter & operator<< (ChVector3d v)
 
ChJSONWriter & operator<< (ChQuaternion<> v)
 
ChJSONWriter & operator<< (ChJSONWriter &)
 
ChJSONWriter & Key (const std::string &v)
 
ChJSONWriter & PointerAsString (size_t v, unsigned int len)
 
ChJSONWriter & StartObject (const std::string &type, const std::string &id)
 
ChJSONWriter & EndObject ()
 
std::string Finish ()
 

The documentation for this class was generated from the following files:
  • /builds/uwsbel/chrono/src/chrono_vehicle/driver/ChExternalDriver.h
  • /builds/uwsbel/chrono/src/chrono_vehicle/driver/ChExternalDriver.cpp