xtistrm.h

来自「A*算法 A*算法 A*算法 A*算法A*算法A*算法」· C头文件 代码 · 共 434 行 · 第 1/2 页

H
434
字号
        const wxClassInfo **objectClassInfos ,
        wxxVariantArray &metadata) = 0;

    // destroy the heap-allocated object having the ID objectID, this may be used if an object
    // is embedded in another object and set via value semantics, so the intermediate
    // object can be destroyed after safely
    virtual void DestroyObject(int objectID, wxClassInfo *classInfo) = 0;

    // set the corresponding property
    virtual void SetProperty(int objectID,
        const wxClassInfo *classInfo,
        const wxPropertyInfo* propertyInfo ,
        const wxxVariant &VariantValue) = 0;

    // sets the corresponding property (value is an object)
    virtual void SetPropertyAsObject(int objectID,
        const wxClassInfo *classInfo,
        const wxPropertyInfo* propertyInfo ,
        int valueObjectId) = 0;

    // adds an element to a property collection
    virtual void AddToPropertyCollection( int objectID ,
        const wxClassInfo *classInfo,
        const wxPropertyInfo* propertyInfo ,
        const wxxVariant &VariantValue) = 0;

    // sets the corresponding property (value is an object)
    virtual void AddToPropertyCollectionAsObject(int objectID,
        const wxClassInfo *classInfo,
        const wxPropertyInfo* propertyInfo ,
        int valueObjectId) = 0;

    // sets the corresponding event handler
    virtual void SetConnect(int EventSourceObjectID,
        const wxClassInfo *EventSourceClassInfo,
        const wxPropertyInfo *delegateInfo ,
        const wxClassInfo *EventSinkClassInfo ,
        const wxHandlerInfo* handlerInfo ,
        int EventSinkObjectID ) = 0;
};

/*
wxRuntimeDepersister implements the callbacks that will depersist
an object into a running memory image, as opposed to writing
C++ initialization code to bring the object to life.
*/

class WXDLLIMPEXP_BASE wxRuntimeDepersister : public wxDepersister
{
    struct wxRuntimeDepersisterInternal ;
    wxRuntimeDepersisterInternal * m_data ;
public :
    wxRuntimeDepersister();
    virtual ~wxRuntimeDepersister();

    // returns the object having the corresponding ID fully constructed
    wxObject *GetObject(int objectID) ;

    // allocate the new object on the heap, that object will have the passed in ID
    virtual void AllocateObject(int objectID, wxClassInfo *classInfo ,
        wxxVariantArray &metadata) ;

    // initialize the already allocated object having the ID objectID with the Create method
    // creation parameters which are objects are having their Ids passed in objectIDValues
    // having objectId <> wxInvalidObjectID

    virtual void CreateObject(int objectID,
        const wxClassInfo *classInfo,
        int paramCount,
        wxxVariant *VariantValues ,
        int *objectIDValues,
        const wxClassInfo **objectClassInfos ,
        wxxVariantArray &metadata
        ) ;

    // construct the new object on the heap, that object will have the passed in ID (for objects that
    // don't support allocate-create type of creation)
    // creation parameters which are objects are having their Ids passed in objectIDValues
    // having objectId <> wxInvalidObjectID

    virtual void ConstructObject(int objectID,
        const wxClassInfo *classInfo,
        int paramCount,
        wxxVariant *VariantValues ,
        int *objectIDValues ,
        const wxClassInfo **objectClassInfos ,
        wxxVariantArray &metadata) ;

    // destroy the heap-allocated object having the ID objectID, this may be used if an object
    // is embedded in another object and set via value semantics, so the intermediate
    // object can be destroyed after safely
    virtual void DestroyObject(int objectID, wxClassInfo *classInfo) ;

    // set the corresponding property
    virtual void SetProperty(int objectID,
        const wxClassInfo *classInfo,
        const wxPropertyInfo* propertyInfo ,
        const wxxVariant &variantValue);

    // sets the corresponding property (value is an object)
    virtual void SetPropertyAsObject(int objectId,
        const wxClassInfo *classInfo,
        const wxPropertyInfo* propertyInfo ,
        int valueObjectId) ;

    // adds an element to a property collection
    virtual void AddToPropertyCollection( int objectID ,
        const wxClassInfo *classInfo,
        const wxPropertyInfo* propertyInfo ,
        const wxxVariant &VariantValue) ;

    // sets the corresponding property (value is an object)
    virtual void AddToPropertyCollectionAsObject(int objectID,
        const wxClassInfo *classInfo,
        const wxPropertyInfo* propertyInfo ,
        int valueObjectId) ;

    // sets the corresponding event handler
    virtual void SetConnect(int eventSourceObjectID,
        const wxClassInfo *eventSourceClassInfo,
        const wxPropertyInfo *delegateInfo ,
        const wxClassInfo *eventSinkClassInfo ,
        const wxHandlerInfo* handlerInfo ,
        int eventSinkObjectID ) ;
};

/*
wxDepersisterCode implements the callbacks that will depersist
an object into a C++ initialization function. this will move to
a utility lib soon
*/

class WXDLLIMPEXP_BASE wxTextOutputStream ;

class WXDLLIMPEXP_BASE wxCodeDepersister : public wxDepersister
{
private :
    struct wxCodeDepersisterInternal ;
    wxCodeDepersisterInternal * m_data ;
    wxTextOutputStream *m_fp;
    wxString ValueAsCode( const wxxVariant &param ) ;
public:
    wxCodeDepersister(wxTextOutputStream *out);
    virtual ~wxCodeDepersister();

    // allocate the new object on the heap, that object will have the passed in ID
    virtual void AllocateObject(int objectID, wxClassInfo *classInfo ,
        wxxVariantArray &metadata) ;

    // initialize the already allocated object having the ID objectID with the Create method
    // creation parameters which are objects are having their Ids passed in objectIDValues
    // having objectId <> wxInvalidObjectID

    virtual void CreateObject(int objectID,
        const wxClassInfo *classInfo,
        int paramCount,
        wxxVariant *variantValues ,
        int *objectIDValues,
        const wxClassInfo **objectClassInfos ,
        wxxVariantArray &metadata
        ) ;

     // construct the new object on the heap, that object will have the passed in ID (for objects that
    // don't support allocate-create type of creation)
    // creation parameters which are objects are having their Ids passed in objectIDValues
    // having objectId <> wxInvalidObjectID

    virtual void ConstructObject(int objectID,
        const wxClassInfo *classInfo,
        int paramCount,
        wxxVariant *VariantValues ,
        int *objectIDValues ,
        const wxClassInfo **objectClassInfos ,
        wxxVariantArray &metadata) ;

    // destroy the heap-allocated object having the ID objectID, this may be used if an object
    // is embedded in another object and set via value semantics, so the intermediate
    // object can be destroyed after safely
    virtual void DestroyObject(int objectID, wxClassInfo *classInfo) ;

    // set the corresponding property
    virtual void SetProperty(int objectID,
        const wxClassInfo *classInfo,
        const wxPropertyInfo* propertyInfo ,
        const wxxVariant &variantValue);

    // sets the corresponding property (value is an object)
    virtual void SetPropertyAsObject(int objectId,
        const wxClassInfo *classInfo,
        const wxPropertyInfo* propertyInfo ,
        int valueObjectId) ;

    // adds an element to a property collection
    virtual void AddToPropertyCollection( int objectID ,
        const wxClassInfo *classInfo,
        const wxPropertyInfo* propertyInfo ,
        const wxxVariant &VariantValue) ;

    // sets the corresponding property (value is an object)
    virtual void AddToPropertyCollectionAsObject(int objectID,
        const wxClassInfo *classInfo,
        const wxPropertyInfo* propertyInfo ,
        int valueObjectId) ;

    // sets the corresponding event handler
    virtual void SetConnect(int eventSourceObjectID,
        const wxClassInfo *eventSourceClassInfo,
        const wxPropertyInfo *delegateInfo ,
        const wxClassInfo *eventSinkClassInfo ,
        const wxHandlerInfo* handlerInfo ,
        int eventSinkObjectID ) ;
};

#endif // wxUSE_EXTENDED_RTTI

#endif

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?