# IRsSysPersist Interface Reference

Inherits IUnknown.

List of all members.

## Public Member Functions
HRESULT | IsSystemDirty (void)
HRESULT | LoadSystem ([in] IStream *pStm)
HRESULT | SaveSystem ([in] IStream *pStm,[in] RtBool fClearDirty)
HRESULT | SaveCommand ([in] IRsCommand *pCmd,[in] IStream *pStm,[in] RtBool fClearDirty)
HRESULT | LoadCommand ([in] IStream *pStm,[out, retval] IRsCommand **ppCmd)
HRESULT | RestoreHistory ([in] IRsHistory *pHistory)
HRESULT | SaveNodeToStream ([in] IRsNode *pNode,[in] IStream *pStm,[in] RtBool fClearDirty)
HRESULT | LoadNodeFromStream ([in] IStream *pStm,[out, retval] IRsNode **ppNode)
HRESULT | SaveObject ([in] IRsPersistStream *pObj,[in] IStream *pStream)
HRESULT | LoadObject ([in] IRsPersistStream *pObj,[in] IStream *pStream)
HRESULT | AttachPoolObj ([in] IRsPoolObj *pObj,[out, retval] DWORD *pdwCookie)
HRESULT | DetachPoolObj ([in] DWORD dwCookie)
HRESULT | GetPoolObj ([in] DWORD dwCookie,[out, retval] IRsPoolObj **ppObj)
HRESULT | CopyNodeToStream ([in] IRsNode *pNode,[in] IStream *pStream)
HRESULT | SaveObjFileHeaderInfo ([in] IStream *pStream,[in] RtObjFileHeaderInfo *pHeaderInfo)
HRESULT | LoadObjFileHeaderInfo ([in] IStream *pStream,[in] RtObjFileHeaderInfo *pHeaderInfo)
HRESULT | WriteObjToSession ([in] IRsSession *pSession,[in] IRsPersistStream *pObj)
HRESULT | WriteNodeToSession ([in] IRsSession *pSession,[in] IRsNode *pNodeObj)
HRESULT | ReadObjFromSession ([in] IRsSession *pSession,[in] IRsPersistStream *pObj)
HRESULT | ReadNodeFromSession ([in] IRsSession *pSession,[out, retval] IRsNode **ppNodeObj)
HRESULT | CreateSessionObj ([out, retval] IRsSession **ppSession)
HRESULT | BeginSession ([in] IRsSession *pSession)
HRESULT | EndSession ([in] IRsSession *pSession)
HRESULT | GetCurrentSession ([out, retval] IRsSession **ppSession)
HRESULT | SaveObjectDelta ([in] IRsPersistDeltaStream *pObjPersistDelta,[in] IRsObject *pOrigObj,[in] IStream *pStream)
HRESULT | LoadObjectDelta ([in] IRsPersistDeltaStream *pObjPersistDelta,[in] IRsObject *pOrigObj,[in] IStream *pStream)

## Detailed Description

System persistence control, helper object for serialization and deserialization.

## Member Function Documentation

HRESULT IRsSysPersist::IsSystemDirty | ( | void |  | ) |

IsSystemDirty.

HRESULT IRsSysPersist::LoadSystem | ( | [in] IStream * | pStm | ) |

Parameters:

  | pStm | [in] .

HRESULT IRsSysPersist::SaveSystem | ( | [in] IStream * | pStm,
|  | [in] RtBool | fClearDirty |
| ) |  |  |

Parameters:

  | pStm | [in] .
  | fClearDirty | [in] .

HRESULT IRsSysPersist::SaveCommand | ( | [in] IRsCommand * | pCmd,
|  | [in] IStream * | pStm,
|  | [in] RtBool | fClearDirty |
| ) |  |  |

Saves Command to the stream object.

Parameters:

  | pCmd | [in] .
  | pStm | [in] .
  | fClearDirty | .

HRESULT IRsSysPersist::LoadCommand | ( | [in] IStream * | pStm,
|  | [out, retval] IRsCommand ** | ppCmd |
| ) |  |  |

Loads command from the stream.

Parameters:

  | pStm | [in] .

Returns:
  ppCmd [out,retval] .

HRESULT IRsSysPersist::RestoreHistory | ( | [in] IRsHistory * | pHistory | ) |

Restore history stack.

Parameters:

  | pHistory | [in] .

HRESULT IRsSysPersist::SaveNodeToStream | ( | [in] IRsNode * | pNode,
|  | [in] IStream * | pStm,
|  | [in] RtBool | fClearDirty |
| ) |  |  |

Saves node with all its sub-objects to stream.

Parameters:

  | pNode | [in] .
  | pStm | [in] .
  | fClearDirty | [in] .

HRESULT IRsSysPersist::LoadNodeFromStream | ( | [in] IStream * | pStm,
|  | [out, retval] IRsNode ** | ppNode |
| ) |  |  |

Loads node with all its sub-objects from stream.

Parameters:

  | pStm | [in] .

Returns:
  ppNode [out,retval] .

HRESULT IRsSysPersist::SaveObject | ( | [in] IRsPersistStream * | pObj,
|  | [in] IStream * | pStream |
| ) |  |  |

Parameters:

  | pObj | [in] .
  | pStream | [in] .

HRESULT IRsSysPersist::LoadObject | ( | [in] IRsPersistStream * | pObj,
|  | [in] IStream * | pStream |
| ) |  |  |

Parameters:

  | pObj | [in] .
  | pStream | [in] .

HRESULT IRsSysPersist::AttachPoolObj | ( | [in] IRsPoolObj * | pObj,
|  | [out, retval] DWORD * | pdwCookie |
| ) |  |  |

Parameters:

  | pObj | [in] .

Returns:
  pdwCookie [out,retval] .

HRESULT IRsSysPersist::DetachPoolObj | ( | [in] DWORD | dwCookie | ) |

Parameters:

  | dwCookie | [in] .

HRESULT IRsSysPersist::GetPoolObj | ( | [in] DWORD | dwCookie,
|  | [out, retval] IRsPoolObj ** | ppObj |
| ) |  |  |

Parameters:

  | dwCookie | [in] .

Returns:
  ppObj [out,retval] .

HRESULT IRsSysPersist::CopyNodeToStream | ( | [in] IRsNode * | pNode,
|  | [in] IStream * | pStream |
| ) |  |  |

Parameters:

  | pNode | [in] .
  | pStream | [in] .

HRESULT IRsSysPersist::SaveObjFileHeaderInfo | ( | [in] IStream * | pStream,
|  | [in] RtObjFileHeaderInfo * | pHeaderInfo |
| ) |  |  |

Parameters:

  | pStream | [in] .
  | pHeaderInfo | [in] .

HRESULT IRsSysPersist::LoadObjFileHeaderInfo | ( | [in] IStream * | pStream,
|  | [in] RtObjFileHeaderInfo * | pHeaderInfo |
| ) |  |  |

Parameters:

  | pStream | [in] .
  | pHeaderInfo | [in] .

HRESULT IRsSysPersist::WriteObjToSession | ( | [in] IRsSession * | pSession,
|  | [in] IRsPersistStream * | pObj |
| ) |  |  |

Parameters:

  | pSession | [in] .
  | pObj | [in] .

HRESULT IRsSysPersist::WriteNodeToSession | ( | [in] IRsSession * | pSession,
|  | [in] IRsNode * | pNodeObj |
| ) |  |  |

Parameters:

  | pSession | [in] .
  | pNodeObj | [in] .

HRESULT IRsSysPersist::ReadObjFromSession | ( | [in] IRsSession * | pSession,
|  | [in] IRsPersistStream * | pObj |
| ) |  |  |

Parameters:

  | pSession | [in] .
  | pObj | [in] .

HRESULT IRsSysPersist::ReadNodeFromSession | ( | [in] IRsSession * | pSession,
|  | [out, retval] IRsNode ** | ppNodeObj |
| ) |  |  |

Parameters:

  | pSession | [in] .

Returns:
  ppNodeObj [out,retval] .

HRESULT IRsSysPersist::CreateSessionObj | ( | [out, retval] IRsSession ** | ppSession | ) |

Returns:
  ppSession [out,retval] .

HRESULT IRsSysPersist::BeginSession | ( | [in] IRsSession * | pSession | ) |

Parameters:

  | pSession | [in] .

HRESULT IRsSysPersist::EndSession | ( | [in] IRsSession * | pSession | ) |

Parameters:

  | pSession | [in] .

HRESULT IRsSysPersist::GetCurrentSession | ( | [out, retval] IRsSession ** | ppSession | ) |

Returns:
  ppSession [out,retval] .

HRESULT IRsSysPersist::SaveObjectDelta | ( | [in] IRsPersistDeltaStream * | pObjPersistDelta,
|  | [in] IRsObject * | pOrigObj,
|  | [in] IStream * | pStream |
| ) |  |  |

Serialize object as delta.

Parameters:

  | pObjPersistDelta | [in] Serialization interface of the object you want to serialize.
  | pOrigObj | [in] Specify object to which the delta should be compared.
  | pStream | [in] Specify the stream to which the delta will be serialized.

Returns:
  S_OK If the delta was successfully serialized.

  S_FALSE If the object was serialized the same way as with SaveObject method.

HRESULT IRsSysPersist::LoadObjectDelta | ( | [in] IRsPersistDeltaStream * | pObjPersistDelta,
|  | [in] IRsObject * | pOrigObj,
|  | [in] IStream * | pStream |
| ) |  |  |

Parameters:

  | pObjPersistDelta | [in] Serialization interface of the object you want to serialize.
  | pOrigObj | [in] Specify object to which the delta should be compared.
  | pStream | [in] Specify the stream to which the delta will be serialized.

Returns:
  S_OK If the delta was successfully serialized.

  S_FALSE If the object was serialized the same way as with SaveObject method.