TinyRobotics
Loading...
Searching...
No Matches
Public Member Functions | List of all members
Serializable Class Referenceabstract

This class defines an interface for serializable objects that can be converted to and from a string representation. It provides two pure virtual methods: toString() for converting the object to a string, and fromString() for populating the object from a string input. This interface can be implemented by any class that needs to support serialization and deserialization, allowing for easy storage, transmission, or logging of object state in a human-readable. More...

#include <Serializable.h>

Inheritance diagram for Serializable:
Inheritance graph
[legend]

Public Member Functions

virtual std::string toString () const =0
 
const char * toCString () const
 
virtual bool fromString (const std::string &in)=0
 
virtual bool fromString (const char *in)
 
size_t writeTo (Print &out) const
 
size_t readFrom (Stream &in)
 

Detailed Description

This class defines an interface for serializable objects that can be converted to and from a string representation. It provides two pure virtual methods: toString() for converting the object to a string, and fromString() for populating the object from a string input. This interface can be implemented by any class that needs to support serialization and deserialization, allowing for easy storage, transmission, or logging of object state in a human-readable.

Member Function Documentation

◆ fromString()

virtual bool fromString ( const std::string &  in)
pure virtual

◆ toString()

virtual std::string toString ( ) const
pure virtual

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