Saves “data” into a file using a StandardSerializer.
template<typename Type> bool SaveFile( const Type & data, string:: ConstString filename )
The Class that pointers use when serializing.
const Class *mSerializationClass
This class represents the begin/end tags in a Serializer/Deserializer stream.
class ReflectExport( reflect ) SerializationTag
Constructs a serialization tag with the given text and TagType.
SerializationTag( const char * text, TagType type )
Serializes the entire array/vector.
void Serialize( const void * in, void * out, Reflector & reflector ) const
void Serialize( const void * in, void * out, Reflector & reflector ) const
Reads or writes the represented data using a Reflector.
virtual void Serialize( const void * in, void * out, Reflector & reflector ) const = 0
Serialize defines how objects represented by this type are serialized.
virtual void Serialize( const void * in, void * out, Reflector & reflector ) const
reads or writes this variant with a reflector.
void Serialize( Reflector & reflector ) const
Emits a bool.
virtual bool Serialize( bool ) = 0
Writes “true”/”false”.
bool Serialize( bool )
The object is serialized using its Category (see <Category.SerializeDynamic>), or, if the object has been <Reference>d, then the serializer should emit a backreference instead.
virtual bool Serialize( const Dynamic * object ) = 0
Writes “#<<obj->GetClass()->GetCategory()->Name()>>” and then defers to obj->GetClass()->GetCategory()->SerializeDynamic(obj, Reflector(*this)).
bool Serialize( const Dynamic * object )
Emits a float/double.
virtual bool Serialize( double ) = 0
Writes “%#g”.
bool Serialize( double )
Emits an integer.
virtual bool Serialize( long ) = 0
Writes “%ld”, e.g., 3 -> “3”
bool Serialize( long )
Emits an integer, maybe in hex.
virtual bool Serialize( unsigned long ) = 0
Writes “0x%lX”, e.g., 32u -> “0x20”
bool Serialize( unsigned long )
Serializes nbytes of data as hex pairs A3 45 23 8F ...
bool SerializeData( const void * data, unsigned nbytes )
Emits an enum value or string.
virtual bool SerializeEnum( int value, const EnumType * type ) = 0
Writes the enum value as a bare string (no quotes).
bool SerializeEnum( int value, const EnumType * clazz )
Reads/writes a single item to the reflector.
virtual void SerializeItem( const void * in, void * out, unsigned index, Reflector & reflector ) const = 0
virtual void SerializePointer( const Dynamic * in, Reflector & reflector ) const
void SerializeProperties( const Persistent * , Reflector & ) const
virtual bool SerializeProperty( const void * object, const Property * prop ) = 0
Writes the property by deferring to its Property::Serialize method.
bool SerializeProperty( const void * object, const Property * prop )
Defines the interface for serialization.
class ReflectExport( reflect ) Serializer
virtual ~Serializer()
The serializer this Reflector is managing, or NULL if it is Deserializing.
Serializer *mSerializer
void ( ObjectType::*mSerializer )(Reflector &) const
Emits a string.
virtual bool SerializeText( const char * text, unsigned nbytes ) = 0
Writes nbytes of text as a string with quotes around it and some standard escapes.
bool SerializeText( const char * text, unsigned nbytes )
true when this reflector represents a Serializer
bool Serializing() const
Assigns a value to the variant.
bool Set( const Variant & value )
void SetAccessors( int (*)(const void *), void (*)(void *, int) )
Sets the factory function for this class.
void SetBasicOperations( unsigned size, unsigned alignment, void * (*construct)(void *), void * (*destruct)(void *) )
void SetExecutionFunction( int (*)(int, char *[]) )
Sets the name of the type and calls RegisterName to it in a global map.
void SetName( const char * name )
Sets the parent (base class) of this Type.
void SetParent( Type * parent )
void ( ObjectType::*mSetter )(const MemberType &)
void ( ObjectType::*mSetter )(const MemberType &)
void ( ObjectType::*mSetter )(MemberType)
Template version of Set.
template<typename T> bool SetValue( const T & value )
A composite serializer that deserializes pointers as raw data rather than traversing them.
class ReflectExport( reflect ) ShallowDeserializer : public CompositeDeserializer
A composite serializer that serializes pointers as raw data rather than traversing them.
class ReflectExport( reflect ) ShallowSerializer : public CompositeSerializer
static JavaScriptRuntime SharedRuntime()
Constructs an empty shared string.
SharedString()
Constructs a shared string from a character pointer, used by StringPools.
SharedString( const char * string, const StringPool * owner )
The next sibling of this class, or itself if there are no siblings.
Type *Sibling() const
Signatures provide a uniform means of accessing the Class object and the static type of that class of any reflected type, dynamic (Dynamic) or not.
template<typename T> struct Signature
same as length, for compatibility with std::string.
size_type size() const
the current length of the string.
size_type size() const
Gets the current size of the array/vector in the object.
virtual unsigned Size( const void * object ) const = 0
The size of the object represented by this class.
unsigned Size() const
unsigned mSize
size_type size()
typedef unsigned size_type
typedef unsigned size_type
A basic ascii text deserializer.
class ReflectExport( reflect ) StandardDeserializer : public Deserializer
A basic ascii text serializer.
class ReflectExport( reflect ) StandardSerializer : public Serializer
Holds a concatenated block of strings.
class StringBlock
A string pool manages SharedStrings.
class ReflectExport( reflect ) StringPool
explicit StringPool( const StringPool * parent = NULL )
class ReflectExport( reflect ) StringPoolContext : public StringPool , public utility::Context<StringPoolContext>
Reflects a struct as a property-tuple.
class ReflectExport( reflect ) StructType : public ObjectType
template<typename T> class StructType::DescriptionHelper : public ObjectType::DescriptionHelper<T>
Makes a substr fragment from this one.
Fragment substr( size_type index, size_type amount = npos ) const