Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
CapitalizeFilter< OutputHandler > Struct Template Reference

Public Member Functions

 CapitalizeFilter (OutputHandler &out)
 
bool Null ()
 
bool Bool (bool b)
 
bool Int (int i)
 
bool Uint (unsigned u)
 
bool Int64 (int64_t i)
 
bool Uint64 (uint64_t u)
 
bool Double (double d)
 
bool RawNumber (const char *str, SizeType length, bool copy)
 
bool String (const char *str, SizeType length, bool)
 
bool StartObject ()
 
bool Key (const char *str, SizeType length, bool copy)
 
bool EndObject (SizeType memberCount)
 
bool StartArray ()
 
bool EndArray (SizeType elementCount)
 

Public Attributes

OutputHandler & out_
 
std::vector< char > buffer_
 

Detailed Description

template<typename OutputHandler>
struct CapitalizeFilter< OutputHandler >

Definition at line 17 of file capitalize.cpp.

Constructor & Destructor Documentation

◆ CapitalizeFilter()

template<typename OutputHandler >
CapitalizeFilter< OutputHandler >::CapitalizeFilter ( OutputHandler & out)
inline

Definition at line 18 of file capitalize.cpp.

18: out_(out), buffer_() {}
std::vector< char > buffer_
OutputHandler & out_

Member Function Documentation

◆ Bool()

template<typename OutputHandler >
bool CapitalizeFilter< OutputHandler >::Bool ( bool b)
inline

Definition at line 21 of file capitalize.cpp.

21{ return out_.Bool(b); }

◆ Double()

template<typename OutputHandler >
bool CapitalizeFilter< OutputHandler >::Double ( double d)
inline

Definition at line 26 of file capitalize.cpp.

26{ return out_.Double(d); }

◆ EndArray()

template<typename OutputHandler >
bool CapitalizeFilter< OutputHandler >::EndArray ( SizeType elementCount)
inline

Definition at line 38 of file capitalize.cpp.

38{ return out_.EndArray(elementCount); }

◆ EndObject()

template<typename OutputHandler >
bool CapitalizeFilter< OutputHandler >::EndObject ( SizeType memberCount)
inline

Definition at line 36 of file capitalize.cpp.

36{ return out_.EndObject(memberCount); }

◆ Int()

template<typename OutputHandler >
bool CapitalizeFilter< OutputHandler >::Int ( int i)
inline

Definition at line 22 of file capitalize.cpp.

22{ return out_.Int(i); }

◆ Int64()

template<typename OutputHandler >
bool CapitalizeFilter< OutputHandler >::Int64 ( int64_t i)
inline

Definition at line 24 of file capitalize.cpp.

24{ return out_.Int64(i); }

◆ Key()

template<typename OutputHandler >
bool CapitalizeFilter< OutputHandler >::Key ( const char * str,
SizeType length,
bool copy )
inline

Definition at line 35 of file capitalize.cpp.

35{ return String(str, length, copy); }
bool String(const char *str, SizeType length, bool)
Here is the call graph for this function:

◆ Null()

template<typename OutputHandler >
bool CapitalizeFilter< OutputHandler >::Null ( )
inline

Definition at line 20 of file capitalize.cpp.

20{ return out_.Null(); }

◆ RawNumber()

template<typename OutputHandler >
bool CapitalizeFilter< OutputHandler >::RawNumber ( const char * str,
SizeType length,
bool copy )
inline

Definition at line 27 of file capitalize.cpp.

27{ return out_.RawNumber(str, length, copy); }

◆ StartArray()

template<typename OutputHandler >
bool CapitalizeFilter< OutputHandler >::StartArray ( )
inline

Definition at line 37 of file capitalize.cpp.

37{ return out_.StartArray(); }

◆ StartObject()

template<typename OutputHandler >
bool CapitalizeFilter< OutputHandler >::StartObject ( )
inline

Definition at line 34 of file capitalize.cpp.

34{ return out_.StartObject(); }

◆ String()

template<typename OutputHandler >
bool CapitalizeFilter< OutputHandler >::String ( const char * str,
SizeType length,
bool  )
inline

Definition at line 28 of file capitalize.cpp.

28 {
29 buffer_.clear();
30 for (SizeType i = 0; i < length; i++)
31 buffer_.push_back(static_cast<char>(std::toupper(str[i])));
32 return out_.String(&buffer_.front(), length, true); // true = output handler need to copy the string
33 }
RAPIDJSON_NAMESPACE_BEGIN typedef unsigned SizeType
Size type (for string lengths, array sizes, etc.)
Definition rapidjson.h:384
Here is the caller graph for this function:

◆ Uint()

template<typename OutputHandler >
bool CapitalizeFilter< OutputHandler >::Uint ( unsigned u)
inline

Definition at line 23 of file capitalize.cpp.

23{ return out_.Uint(u); }

◆ Uint64()

template<typename OutputHandler >
bool CapitalizeFilter< OutputHandler >::Uint64 ( uint64_t u)
inline

Definition at line 25 of file capitalize.cpp.

25{ return out_.Uint64(u); }

Member Data Documentation

◆ buffer_

template<typename OutputHandler >
std::vector<char> CapitalizeFilter< OutputHandler >::buffer_

Definition at line 41 of file capitalize.cpp.

◆ out_

template<typename OutputHandler >
OutputHandler& CapitalizeFilter< OutputHandler >::out_

Definition at line 40 of file capitalize.cpp.


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