#include <iordf.h>

Public Member Functions | |
| IORdfModule (const MODULE_ID &_id, const wxString &_name, EventHandler *msgSink) | |
| Class constructor. | |
| virtual | ~IORdfModule () |
| Class destructor. | |
| virtual wxString | GetDesc () const |
Get module description - Module overload. | |
| virtual wxString | GetSupportedExts () const |
Get string with file extensions supported by module - IOModule overload. | |
| virtual bool | ImportScene (const wxString &fname, SCENE_ID _sceneID, const wxString &rootUid) |
| virtual bool | ExportScene (const wxString &fname, const Scene *scene) |
| Export scene to file. | |
Protected Member Functions | |
| virtual void | processEvent (wxCommandEvent &evt) |
Process event - SceneIOModule overload. | |
Definition at line 24 of file iordf.h.
| IORdfModule::IORdfModule | ( | const MODULE_ID & | _id, | |
| const wxString & | _name, | |||
| EventHandler * | msgSink | |||
| ) |
| IORdfModule::~IORdfModule | ( | ) | [virtual] |
| void IORdfModule::processEvent | ( | wxCommandEvent & | evt | ) | [protected, virtual] |
Process event - SceneIOModule overload.
Reimplemented from VRUT::IOModule.
Definition at line 39 of file iordf.cpp.
00040 { 00041 IOModule::processEvent(evt); 00042 }
| wxString IORdfModule::GetDesc | ( | ) | const [virtual] |
Get module description - Module overload.
Implements VRUT::Module.
Definition at line 29 of file iordf.cpp.
| wxString IORdfModule::GetSupportedExts | ( | ) | const [virtual] |
Get string with file extensions supported by module - IOModule overload.
Implements VRUT::IOModule.
Definition at line 34 of file iordf.cpp.
| bool IORdfModule::ImportScene | ( | const wxString & | fname, | |
| SCENE_ID | _sceneID, | |||
| const wxString & | rootUid | |||
| ) | [virtual] |
Import scene from file - SceneIOModule overload
| [in] | fname | Path to scene files (archive) |
| [in] | _sceneID | ID of scene to be filled with data |
| [in] | rootUid | Uid of node where to start filling |
True if successful Implements VRUT::IOModule.
Definition at line 44 of file iordf.cpp.
00045 { 00046 wxStopWatch sw; 00047 bool ret = false; 00048 wxInputStream * is = GetInputStream(fname); 00049 if (is) 00050 { 00051 RDFParser rdfParser(is, _sceneID, fname, this); 00052 ret = rdfParser.Parse(rootUid); 00053 delete is; 00054 } 00055 LOG(wxString::Format(wxT("<IORdfModule>Scene parsed in %.3f secs, ID %i"), 0.001f * sw.Time(), _sceneID)); 00056 wxCommandEvent ev = Event::GET_EVT_IO_SCENE_IMPORT_DONE(_sceneID); 00057 PostToKernel(ev); 00058 return ret; 00059 }
| bool IORdfModule::ExportScene | ( | const wxString & | fname, | |
| const Scene * | scene | |||
| ) | [virtual] |
Export scene to file.
Implements VRUT::IOModule.
Definition at line 61 of file iordf.cpp.
00062 { 00063 wxOutputStream * sceneStream = new wxFileOutputStream(fname); 00064 if (sceneStream && sceneStream->IsOk()) 00065 { 00066 wxBufferedOutputStream *sceneStream2=new wxBufferedOutputStream(*sceneStream); 00067 RDFWriter rdfWriter(sceneStream2, scene); 00068 rdfWriter.Write(); 00069 sceneStream2->Sync(); 00070 SAFE_DELETE(sceneStream); 00071 return true; 00072 } 00073 SAFE_DELETE(sceneStream); 00074 return false; 00075 }
1.5.5