class CCL::BinaryArchive

Overview

Binary storage archive. More…

#include <binaryarchive.h>

class BinaryArchive: public CCL::Archive
{
public:
    // construction

    BinaryArchive (
        IStream& stream,
        Attributes* context = nullptr,
        StringID saveType = nullptr
    );

    // methods

    virtual ArchiveType getArchiveType () const;
    virtual bool isAnonymous () const;
    virtual bool saveAttributes (ObjectID root, const Attributes& attributes);
    virtual bool loadAttributes (ObjectID root, Attributes& attributes);
    static const FileType& getFileType ();
};

Inherited Members

public:
    // typedefs

    typedef CStringRef ObjectID;

    // fields

    static StringID kSaveTypeCopy;
    static StringID kSaveTypePreview;

    // methods

    virtual ArchiveType getArchiveType () const = 0;
    virtual bool isAnonymous () const = 0;
    PROPERTY_VARIABLE (int, flags, Flags);
    void setContext (Attributes* context);
    Attributes* getContext ();
    PROPERTY_MUTABLE_CSTRING (saveType, SaveType);
    bool saveObject (ObjectID name, const Object& object);
    bool loadObject (ObjectID name, Object& object);
    virtual bool saveAttributes (ObjectID root, const Attributes& attributes) = 0;
    virtual bool loadAttributes (ObjectID root, Attributes& attributes) = 0;

Detailed Documentation

Binary storage archive.

Methods

virtual ArchiveType getArchiveType () const

archive type (XML, JSON, binary, etc.)

virtual bool isAnonymous () const

true if archive doesn’t provide type information