# IRfObsFileIO Interface Reference

Inherits IUnknown.

List of all members.

## Public Member Functions
HRESULT | SaveHistory ([in] BSTR bstrFileName,[in] RtBool fClearDirty)
HRESULT | LoadNode ([in] BSTR bszFileName,[out] IRsNode **ppNode)
HRESULT | SaveNode ([in] BSTR bszFileName,[in] IRsNode *pNode)
HRESULT | LoadNodeListFromStream ([in] IStream *pStream,[out] IRsObjectList **ppNodeList)
HRESULT | SaveNodeListToStream ([in] IStream *pStream,[in] IRsObjectList *pNodeList)
HRESULT | LoadNodeList ([in] BSTR bszFileName,[out] IRsObjectList **ppNodeList)
HRESULT | SaveNodeList ([in] BSTR bszFileName,[in] IRsObjectList *pNodeList)
HRESULT | LoadNodeFromResource ([in] HINSTANCE hInstance,[in]RtUlong dwResourceId,[out] IRsNode **ppNode)
HRESULT | LoadSystem ([in] BSTR bszFileName)
HRESULT | FindFileIOTypeIIDByObsoleteExt ([in] BSTR bstrExt,[out, retval] IID *piidFileType)
HRESULT | SpecifyPhysicsObject ([in] BSTR bstrFilePath,[out, retval] IID *piidFileType)

## Detailed Description

This interface is obsolete and could be removed in later version.

- You should use IRfFileIOHelper instead as the interface supports obsolete file formats too.
  Use GetObsFileIOHelper method of the IRpFileIOPck to create this helper.

## Member Function Documentation

HRESULT IRfObsFileIO::SaveHistory | ( | [in] BSTR | bstrFileName,
|  | [in] RtBool | fClearDirty |
| ) |  |  |

Save history into file.

Parameters:

  | bstrFileName | [in] File name or file path where to serialize the history.
  | fClearDirty | [in] Set to TRUE if the flag should be cleared.

Returns:
  Standard HRESULT processing can be applied to the result.

HRESULT IRfObsFileIO::LoadNode | ( | [in] BSTR | bszFileName,
|  | [out] IRsNode ** | ppNode |
| ) |  |  |

Load a node from file.

Parameters:

  | bszFileName | [in] File name or file path of the node.
  | ppNode | [out] Returns de-serialized node.

Returns:
  Standard HRESULT processing can be applied to the result.

HRESULT IRfObsFileIO::SaveNode | ( | [in] BSTR | bszFileName,
|  | [in] IRsNode * | pNode |
| ) |  |  |

Save a node into a file.

Parameters:

  | bszFileName | [in] File name or file path.
  | pNode | [in] Node pointer you want to serialize.

Returns:
  Standard HRESULT processing can be applied to the result.

HRESULT IRfObsFileIO::LoadNodeListFromStream | ( | [in] IStream * | pStream,
|  | [out] IRsObjectList ** | ppNodeList |
| ) |  |  |

Load nodes list from a stream.

Parameters:

  | pStream | [in] Specify stream from which you want to read.
  | ppNode | [out] Returns loaded objects list.

Returns:
  Standard HRESULT processing can be applied to the result.

HRESULT IRfObsFileIO::SaveNodeListToStream | ( | [in] IStream * | pStream,
|  | [in] IRsObjectList * | pNodeList |
| ) |  |  |

Save list of nodes into stream in one node session.

Parameters:

  | pStream | [in] Specify stream to which the object list 'll be saved.
  | pNodeList | [in] The list of nodes that will be saved into the stream.

Returns:
  Standard HRESULT processing can be applied to the result.

HRESULT IRfObsFileIO::LoadNodeList | ( | [in] BSTR | bszFileName,
|  | [out] IRsObjectList ** | ppNodeList |
| ) |  |  |

Load nodes list from a file.

Parameters:

  | pStream | [in] Specify file from which you want to read.
  | ppNode | [out] Returns loaded objects list.

Returns:
  Standard HRESULT processing can be applied to the result.

HRESULT IRfObsFileIO::SaveNodeList | ( | [in] BSTR | bszFileName,
|  | [in] IRsObjectList * | pNodeList |
| ) |  |  |

Save list of nodes into file in one node session.

Parameters:

  | bszFileName | [in] Specify file name to which the object list 'll be saved.
  | pNodeList | [in] The list of nodes that will be saved into the stream.

Returns:
  Standard HRESULT processing can be applied to the result.

HRESULT IRfObsFileIO::LoadNodeFromResource | ( | [in] HINSTANCE | hInstance,
|  | [in] RtUlong | dwResourceId,
|  | [out] IRsNode ** | ppNode |
| ) |  |  |

Load node from a resource.

Parameters:

  | hInstance | [in] Module handle instance containing resource.
  | dwResourceId | [in] Integer resource ID.
  | ppNode | [out] Returns loaded node.

Returns:
  Standard HRESULT processing can be applied to the result.

HRESULT IRfObsFileIO::LoadSystem | ( | [in] BSTR | bszFileName | ) |

Load and apply the system settings.

Parameters:

  | bszFileName | [in] File name or file path of the system configuration.

Returns:
  Standard HRESULT processing can be applied to the result.

HRESULT IRfObsFileIO::FindFileIOTypeIIDByObsoleteExt | ( | [in] BSTR | bstrExt,
|  | [out, retval] IID * | piidFileType |
| ) |  |  |

Get RsFileIOType IID for obsolete file extensions (libraries1).

Parameters:

  | bstrExt | [in] Specify the file type extension used in library1.

Returns:
  piidFileType [out,retval] Returns library2 file type.

  S_OK, if the adequate file type was found, S_FALSE if it wasn't

HRESULT IRfObsFileIO::SpecifyPhysicsObject | ( | [in] BSTR | bstrFilePath,
|  | [out, retval] IID * | piidFileType |
| ) |  |  |

Use this method to decide what type of the physics object it is.

Parameters:

  | bstrFilePath | [in] Full file path of the physics object.

Returns:
  piidFileType [out,retval] Returns file type for library2 IRS_FILETYPE_IID_OBJ_PHYS_ENV or IRS_FILETYPE_IID_OBJ_MATERIAL.

  Standard HRESULT processing can be applied to the result.

Remarks:
  If the input object is not a physics type, it will be determined as IRS_FILETYPE_IID_OBJ_MATERIAL