Public Member Functions | |
| HRESULT | GetFileTypeIID ([out, retval] IID *piidType) |
| HRESULT | GetFileTypeExt ([out, retval] BSTR *pbstrExt) |
| HRESULT | GetAlternativeFileTypeExt ([out, retval] BSTR *pbstrExt) |
| HRESULT | GetFileTypeName ([out, retval] BSTR *pbstrName) |
| HRESULT | GetDefaultThumbnail ([out, retval] IRdBitmap **ppThumbnail) |
| HRESULT | GetFileTypeCaps ([out, retval] RtDWORD *pdwCaps) |
| HRESULT | GetCaps ([in] IRsObject *pObject,[in] RePckFileIOOperation eOperation,[out, retval] RtDWORD *pdwCaps) |
| HRESULT | Save ([in] IRsFileHandle *pRsFileHandle,[in] IRsObject *pObject) |
| HRESULT | SaveAsync ([in] IRsFileHandle *pRsFileHandle,[in] IRsObject *pObject,[in] IRsFileIOAsyncNotify *pNotify) |
| HRESULT | Load ([in] IRsFileHandle *pRsFileHandle,[in] IRsObject *pTarget,[out, retval] IRsObject **ppObject) |
| HRESULT | LoadAsync ([in] IRsFileHandle *pRsFileHandle,[in] IRsObject *pTarget,[in] IRsFileIOAsyncNotify *pNotify) |
| HRESULT | Apply ([in] IRsObject *pObject,[in] IRsObject *pTarget,[out, retval] IRsObject **ppObject) |
| HRESULT | GetNameForObject ([in] IRsObject *pObject,[out, retval] BSTR *pbstrName) |
| HRESULT | GetThumbnailForObject ([in] IRsObject *pObject,[out, retval] IRdBitmap **ppThumbnail) |
| HRESULT | GetThumbnailFromStream ([in] IRsFileHandle *pRsFileHandle,[out, retval] IRdBitmap **ppThumbnail) |
Use this interface for example if your package defines new object or material type and you want to serialize/deserialize it with specified new file extension.
Sync vs. Async , Save and Apply operations: The synchronous operation may access the Dependency graph, therefore always call them from a command that can access the DG. Asynchronous operations treat the DG itself, so you can call them from any thread. Remember that synchronous operation don't implements UNDO/REDO operations.
| HRESULT IRsFileIOType::GetFileTypeIID | ( | [out, retval] IID * | piidType | ) |
Get file type GUID.
| piidType | [out, retval] Returns file type IID. |
| HRESULT IRsFileIOType::GetFileTypeExt | ( | [out, retval] BSTR * | pbstrExt | ) |
Get file extension.
| pbstrExt | [out, retval] Returns file type extension. |
| HRESULT IRsFileIOType::GetAlternativeFileTypeExt | ( | [out, retval] BSTR * | pbstrExt | ) |
Get alternative file extension(s).
| pbstrExt | [out, retval] Returns alternative file type extension(s) separated by semicolon(s) (e.g. ".bmp;.dib). The main extension is included in the string. |
| HRESULT IRsFileIOType::GetFileTypeName | ( | [out, retval] BSTR * | pbstrName | ) |
Get file type short name.
| pbstrName | [out, retval] Returns file type name. |
| HRESULT IRsFileIOType::GetDefaultThumbnail | ( | [out, retval] IRdBitmap ** | ppThumbnail | ) |
Get default object file type thumbnail.
| ppThumbnail | [out, retval] Returns default thumbnail. |
| HRESULT IRsFileIOType::GetFileTypeCaps | ( | [out, retval] RtDWORD * | pdwCaps | ) |
Get file type capabilities.
| pdwCaps | [out, retval] Return's capabilities for the file type. See IRsPackageFileIOReg::RePckFileTypeIOCaps for more details. |
| HRESULT IRsFileIOType::GetCaps | ( | [in] IRsObject * | pObject, | |
| [in] RePckFileIOOperation | eOperation, | |||
| [out, retval] RtDWORD * | pdwCaps | |||
| ) |
Get all capabilities for the object and/or file type.
| pObject | [in] The object that is to be checked. The object could be any arbitrary Rosetta object, such as DataObject, Node, Selection or just NULL if an global property should be checked. | |
| eOperation | [in] Operation that is asking for the caps. You can take in consider your caps only for specified operation. See IRsPackageFileIOReg::RePckFileIOOperation for more details. | |
| pdwCaps | [out, retval] Return's capabilities for the object. See IRsPackageFileIOReg::RePckFileIOCaps for more details |
| HRESULT IRsFileIOType::Save | ( | [in] IRsFileHandle * | pRsFileHandle, | |
| [in] IRsObject * | pObject | |||
| ) |
Serialize given object in desired file/stream format. FileIO system automatically add header, thumbnail and other chunks for the file/stream, but if you wants change them or add another chunks, this method should do it.
| pRsFileHandle | [in] Handle to the stream where the object should be serialized. | |
| pObject | [in] The object that is to be serialized. The object could be any arbitrary Rosetta object, such as DataObject, Node, Selection and etc. |
E_INVALIDARG - if the object cannot be saved in desired format.
other standard error.
| HRESULT IRsFileIOType::SaveAsync | ( | [in] IRsFileHandle * | pRsFileHandle, | |
| [in] IRsObject * | pObject, | |||
| [in] IRsFileIOAsyncNotify * | pNotify | |||
| ) |
Serialize given object in desired file/stream format asynchronously. FileIO system automatically adds header, thumbnail and other chunks for the file/stream, but if you want to change them or add other chunks, this method should do it.
| pRsFileHandle | [in] Handle to the stream where the object should be serialized. | |
| pObject | [in] The object that is to be serialized. The object could be any arbitrary Rosetta object, such as DataObject, Node, Selection and etc. | |
| pNotify | [in] - Put here an IRsFileIOAsyncNotify object that will be called when the operation finish. |
E_INVALIDARG - if the object cannot be saved in desired format.
other standard error.
| HRESULT IRsFileIOType::Load | ( | [in] IRsFileHandle * | pRsFileHandle, | |
| [in] IRsObject * | pTarget, | |||
| [out, retval] IRsObject ** | ppObject | |||
| ) |
Deserialize given object as desired file/stream format.
| pRsFileHandle | [in] File handle from which the object should be deserialized. | |
| pTarget | [in] If target is:
| |
| ppObject | [out, retval] Returns interface to the deserialized object if it possible. This parameter is optional and can be NULL. |
S_FALSE - if the object was loaded successfully but it was not applied. In such case caller may call your Apply method.
E_INVALIDARG - if the object cannot be deserialized in desired format. In this case check the ppObject as the object could be loaded but not applied. If you don't need the object, release it properly (e.g. IRsNode->Destroy()).
other standard error.
| HRESULT IRsFileIOType::LoadAsync | ( | [in] IRsFileHandle * | pRsFileHandle, | |
| [in] IRsObject * | pTarget, | |||
| [in] IRsFileIOAsyncNotify * | pNotify | |||
| ) |
Deserialize given object as desired file/stream format asynchronously.
| pRsFileHandle | [in] File handle from which the object should be deserialized. | |
| pTarget | [in] If target is:
| |
| pNotify | [in] - Put here an IRsFileIOAsyncNotify object that will be called when the operation finish. |
E_INVALIDARG - if the object cannot be deserialized in desired format. In this case check the ppObject as the object could be loaded but not applied. If you don't need the object, release it properly (e.g. IRsNode->Destroy())
other standard error.
| HRESULT IRsFileIOType::Apply | ( | [in] IRsObject * | pObject, | |
| [in] IRsObject * | pTarget, | |||
| [out, retval] IRsObject ** | ppObject | |||
| ) |
Apply given object as desired file/stream format to target object. While the load method is called to load the object, this method is called to apply the loaded object on target. E.g you load material once but apply it to more targets. In such case caller could call the Load with NULL target and then Apply with different targets. Another usage is to apply loaded object even if target is not specified. For example you know load Space 3D even if target is NULL. This cannot be done while the Load is called as you don't know what caller intends with the loaded object.
| pObject | [in] Object that should be applied. | |
| pTarget | [in] Target object on which the object should be applied. The object could be any arbitrary Rosetta object, such as DataObject, Node, Selection, NULL and etc. | |
| ppObject | [out, retval] Returns interface to the applied object if it possible. When the applied pObject was destroyed during the apply action, then ppObject points to applied object. |
S_FALSE - if the object was applied successfully but caller should delete the source object if it is not more necessary.
E_INVALIDARG - if the object cannot be applied in desired format.
other standard error.
| HRESULT IRsFileIOType::GetNameForObject | ( | [in] IRsObject * | pObject, | |
| [out, retval] BSTR * | pbstrName | |||
| ) |
Get name for the object. The name will be used e.g. in header or default filename.
| pObject | [in] Object thats name is required. | |
| pbstrName | [out, retval] Returns object's name. |
| HRESULT IRsFileIOType::GetThumbnailForObject | ( | [in] IRsObject * | pObject, | |
| [out, retval] IRdBitmap ** | ppThumbnail | |||
| ) |
Get thumbnail for object.
| pObject | [in] Object for which the thumbnail is required. | |
| ppThumbnail | [out, retval] Returns thumbnail for the object. : If you don't return a thumbnail, then an automatically generated or none will be added . |
| HRESULT IRsFileIOType::GetThumbnailFromStream | ( | [in] IRsFileHandle * | pRsFileHandle, | |
| [out, retval] IRdBitmap ** | ppThumbnail | |||
| ) |
Get thumbnail from stream. If the stream is not Rosetta object, then this method is called to get the thumbnail.
| pRsFileHandle | [in] File handle for the stream. | |
| ppThumbnail | [out, retval] Returns thumbnail for the object. : If you don't return a thumbnail, then an automatically generated or none will be added. |
1.5.5