Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
ParseStringHandler< Encoding > Struct Template Reference
Inheritance diagram for ParseStringHandler< Encoding >:
Collaboration diagram for ParseStringHandler< Encoding >:

Public Member Functions

 ParseStringHandler ()
 
 ~ParseStringHandler ()
 
 ParseStringHandler (const ParseStringHandler &)
 
ParseStringHandleroperator= (const ParseStringHandler &)
 
bool Default ()
 
bool String (const typename Encoding::Ch *str, size_t length, bool copy)
 
- Public Member Functions inherited from BaseReaderHandler< Encoding, ParseStringHandler< Encoding > >
bool Default ()
 
bool Null ()
 
bool Bool (bool)
 
bool Int (int)
 
bool Uint (unsigned)
 
bool Int64 (int64_t)
 
bool Uint64 (uint64_t)
 
bool Double (double)
 
bool RawNumber (const Ch *str, SizeType len, bool copy)
 enabled via kParseNumbersAsStringsFlag, string is not null-terminated (use length)
 
bool String (const Ch *, SizeType, bool)
 
bool StartObject ()
 
bool Key (const Ch *str, SizeType len, bool copy)
 
bool EndObject (SizeType)
 
bool StartArray ()
 
bool EndArray (SizeType)
 

Public Attributes

const Encoding::Ch * str_
 
size_t length_
 
bool copy_
 

Additional Inherited Members

- Public Types inherited from BaseReaderHandler< Encoding, ParseStringHandler< Encoding > >
typedef Encoding::Ch Ch
 
typedef internal::SelectIf< internal::IsSame< ParseStringHandler< Encoding >, void >, BaseReaderHandler, ParseStringHandler< Encoding > >::Type Override
 

Detailed Description

template<typename Encoding>
struct ParseStringHandler< Encoding >

Definition at line 756 of file readertest.cpp.

Constructor & Destructor Documentation

◆ ParseStringHandler() [1/2]

template<typename Encoding >
ParseStringHandler< Encoding >::ParseStringHandler ( )
inline

Definition at line 757 of file readertest.cpp.

757: str_(0), length_(0), copy_() {}
const Encoding::Ch * str_

◆ ~ParseStringHandler()

template<typename Encoding >
ParseStringHandler< Encoding >::~ParseStringHandler ( )
inline

Definition at line 758 of file readertest.cpp.

758{ EXPECT_TRUE(str_ != 0); if (copy_) free(const_cast<typename Encoding::Ch*>(str_)); }
#define EXPECT_TRUE(condition)
Definition gtest.h:1895

◆ ParseStringHandler() [2/2]

Member Function Documentation

◆ Default()

template<typename Encoding >
bool ParseStringHandler< Encoding >::Default ( )
inline

Definition at line 763 of file readertest.cpp.

763{ ADD_FAILURE(); return false; }
#define ADD_FAILURE()
Definition gtest.h:1844

◆ operator=()

template<typename Encoding >
ParseStringHandler & ParseStringHandler< Encoding >::operator= ( const ParseStringHandler< Encoding > & )

◆ String()

template<typename Encoding >
bool ParseStringHandler< Encoding >::String ( const typename Encoding::Ch * str,
size_t length,
bool copy )
inline

Definition at line 764 of file readertest.cpp.

764 {
765 EXPECT_EQ(0, str_);
766 if (copy) {
767 str_ = static_cast<typename Encoding::Ch*>(malloc((length + 1) * sizeof(typename Encoding::Ch)));
768 memcpy(const_cast<typename Encoding::Ch*>(str_), str, (length + 1) * sizeof(typename Encoding::Ch));
769 }
770 else
771 str_ = str;
772 length_ = length;
773 copy_ = copy;
774 return true;
775 }
#define EXPECT_EQ(val1, val2)
Definition gtest.h:1954
return str
Definition CLI11.hpp:1359
void copy(const path &from, const path &to)
memcpy((char *) pInfo->slotDescription, s, l)
Here is the call graph for this function:

Member Data Documentation

◆ copy_

template<typename Encoding >
bool ParseStringHandler< Encoding >::copy_

Definition at line 779 of file readertest.cpp.

◆ length_

template<typename Encoding >
size_t ParseStringHandler< Encoding >::length_

Definition at line 778 of file readertest.cpp.

◆ str_

template<typename Encoding >
const Encoding::Ch* ParseStringHandler< Encoding >::str_

Definition at line 777 of file readertest.cpp.


The documentation for this struct was generated from the following file: