16 #ifndef INCLUDE_NN_NLIB_MSGPACK_CSVREADER_H_ 17 #define INCLUDE_NN_NLIB_MSGPACK_CSVREADER_H_ 22 #include "nn/nlib/Swap.h" 24 #if defined(_MSC_VER) && defined(nx_msgpack_EXPORTS) 25 #undef NLIB_VIS_PUBLIC 26 #define NLIB_VIS_PUBLIC NLIB_WINEXPORT 54 #ifdef __cpp_rvalue_references 55 static std::pair<bool, MpObject>
57 std::pair<bool, MpObject> rval;
58 rval.first =
Read(&rval.second, csvtext);
67 void SetError(
errno_t e) NLIB_NOEXCEPT {
68 if (error_ == 0) error_ = e;
72 struct CsvReaderPrivate;
73 CsvReaderPrivate* prv_;
80 NLIB_DEFINE_STD_SWAP(::nlib_ns::msgpack::CsvReader)
81 #if defined(_MSC_VER) && defined(nx_msgpack_EXPORTS) 82 #undef NLIB_VIS_PUBLIC 83 #define NLIB_VIS_PUBLIC NLIB_WINIMPORT 86 #endif // INCLUDE_NN_NLIB_MSGPACK_CSVREADER_H_ CSV parser. Reads and parses the CSV string from the stream.
#define NLIB_DISALLOW_COPY_AND_ASSIGN(TypeName)
Prohibits use of the copy constructor and assignment operator for the class specified by TypeName...
#define NLIB_SAFE_BOOL(class_name, exp)
Defines a safe operator bool function in the class. Uses the C++11 explicit bool if it is available f...
Object created when MessagePack or JSON is read.
Object created when MessagePack, JSON, or CSV is read.
#define NLIB_NOEXCEPT
Defines noexcept geared to the environment, or the equivalent.
~CsvReader() noexcept
Destructor.
#define NLIB_CEXPR
Defines constexpr if it is available for use. If not, holds an empty string.
constexpr CsvReader() noexcept
Instantiates the object with default parameters (default constructor).
#define NLIB_FINAL
Defines final if it is available for use. If not, holds an empty string.
bool Read(BinaryReader *r, T *x)
You can read to user-defined class objects by specializing this function template.
errno_t GetErrorValue() const noexcept
Gets the error that occurred.