|
Devel Lib
|
Represents a JSON number data type and provides serialization and deserialization functionality for arithmetic types. More...
#include <JsonSerializableNumber.h>


Public Member Functions | |
| IJsonNumber (const CJsonFieldName i_oFieldName) | |
Constructs an IJsonNumber object with the specified field name. More... | |
| auto & | operator= (const T &i_tValue) |
Assigns a value to the IJsonNumber object. More... | |
| auto & | operator= (T &&i_tValue) |
Assigns a rvalue to the IJsonNumber object. More... | |
Public Member Functions inherited from Devel::Serializing::IJsonType< T, IArithmetic< T > > | |
| bool | doDeserialize (IO::CJsonObject &i_oObject, const bool i_bIsStrict=false) |
| Deserializes the object from a JSON object. More... | |
| bool | doSerialize (IO::CJsonObject &i_oObject, const bool i_bIsStrict=false) const |
| Serializes the object to a JSON object. More... | |
| size_t | size () const override |
| Retrieves the size of the object. More... | |
| IJsonType & | operator= (const TJsonFieldName &i_tValue) |
| Assigns a JSON field name to the object. More... | |
| IJsonType & | operator= (TJsonFieldName &&i_tValue) |
| Assigns a JSON field name to the object (move assignment). More... | |
Public Member Functions inherited from Devel::Serializing::IArithmetic< T, IsHidden, > | |
| CreateSerializeOperators (T, IsHidden) | |
Public Member Functions inherited from Devel::Serializing::IData< T, false > | |
| virtual | ~IData ()=default |
| Default destructor. | |
| bool | doSerialize (IO::CWriteStream &i_oStream) const |
| Serializes the data to a write stream. More... | |
| bool | doDeserialize (IO::CReadStream &i_oStream) |
| Deserializes the data from a read stream. More... | |
| bool | doDeserialize (const char *i_szString) |
| Deserializes the data from a string. More... | |
| bool | doDeserialize (std::vector< std::string >::const_iterator &i_oIt, const std::vector< std::string >::const_iterator &i_oItEnd) |
| Deserializes the data from a range of strings. More... | |
| virtual bool | isHidden () const |
| Returns whether the field is hidden. More... | |
| virtual SCompareData | compareData () const |
| Returns the compare data for the data field. More... | |
| auto | begin () const |
| Returns an iterator pointing to the beginning of the value. More... | |
| auto | end () const |
| Returns an iterator pointing to the end of the value. More... | |
| auto & | operator[] (const size_t i_nIndex) |
| Returns a reference to the value at the specified index. More... | |
| const auto & | operator[] (const size_t i_nIndex) const |
| Returns a const reference to the value at the specified index. More... | |
| SerializerEnableIfNotArithmetic (IData< T > &) operator--() | |
| Pre-decrement operator. More... | |
| SerializerEnableIfNotArithmetic (IData< T > &) operator--(int) | |
| Post-decrement operator. More... | |
| SerializerEnableIfNotArithmetic (IData< T > &) operator++() | |
| Pre-increment operator. More... | |
| SerializerEnableIfNotArithmetic (IData< T > &) operator++(int) | |
| Post-increment operator. More... | |
Public Member Functions inherited from Devel::Serializing::IValue< T > | |
| template<typename ... TArgs, std::enable_if_t< std::is_constructible_v< T, TArgs... >> * = nullptr> | |
| IValue (TArgs... i_tArgs) | |
Constructs an IValue object with the specified arguments. More... | |
| const T & | value () const |
| Returns the value. More... | |
| T & | value () |
| Returns a reference to the value. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from Devel::Serializing::IJsonType< T, IArithmetic< T > > | |
| IJsonType (const CJsonFieldName i_oFieldName) | |
Constructs an IJsonType object with the specified JSON field name. More... | |
| virtual | ~IJsonType ()=default |
| Destructor. | |
| virtual bool | onSerialize (IO::CJsonObject &i_oObject, const bool i_bIsStrict) const |
| Called during serialization to convert the object to a JSON object. More... | |
| virtual bool | onSerialize (IO::CJsonObject &i_oObject) const |
| Called during deserialization to populate the object from a JSON object (non-strict mode). More... | |
| bool | serialize (IO::CJsonObject &i_oObject, const bool i_bIsStrict=false) const |
| Serializes the data to a JSON object. More... | |
| std::string_view | name () const |
| Retrieves the name of the JSON field. More... | |
| bool | isNull () const |
| Checks if the JSON field is null. More... | |
| void | setNull (bool i_bState) |
| Sets the null state of the JSON field. More... | |
| IO::CJsonObject * | getObject (IO::CJsonObject &i_oObject, const bool i_bIsStrict) |
| Retrieves the JSON object for the specified JSON field. More... | |
| bool | checkSerializeObject (IO::CJsonObject &i_oObject, const bool i_bIsStrict) const |
| Checks if serialization of the object is allowed and handles null fields. More... | |
Protected Attributes inherited from Devel::Serializing::IValue< T > | |
| T | m_tValue |
| The value. | |
Represents a JSON number data type and provides serialization and deserialization functionality for arithmetic types.
| T | The underlying arithmetic type. |
|
inline |
Constructs an IJsonNumber object with the specified field name.
| i_oFieldName | The field name for the JSON number. |
|
inline |
Assigns a value to the IJsonNumber object.
| i_tValue | The value to assign. |
IJsonNumber object.
|
inline |
Assigns a rvalue to the IJsonNumber object.
| i_tValue | The rvalue to assign. |
IJsonNumber object.