#include <OSGSceneFileType.h>
Public Types | |
| typedef std::vector < FieldContainerPtr > | FCPtrStore |
Flags | |
| enum | { OSG_READ_SUPPORTED = 1, OSG_WRITE_SUPPORTED = 2 } |
Public Member Functions | |
Class Get | |
| virtual const Char8 * | getName (void) const =0 |
Destructors | |
| virtual | ~SceneFileType (void) |
Set | |
| void | setOptions (const Char8 *options) |
Get | |
| virtual std::list< IDString > & | suffixList (void) |
| bool | doOverride (void) |
| UInt32 | getOverridePriority (void) |
| UInt32 | getFlags (void) |
| const Char8 * | getOptions (void) |
Read | |
| virtual NodePtr | read (std::istream &is, const Char8 *fileNameOrExtension) const |
| virtual NodePtr | readFile (const Char8 *fileName) const |
Write | |
| virtual bool | write (const NodePtr &node, std::ostream &os, const Char8 *fileNameOrExtension) const |
| virtual bool | writeFile (const NodePtr &node, const Char8 *fileName) const |
Debug | |
| void | print (void) |
Protected Member Functions | |
Constructors | |
| SceneFileType (const Char8 *suffixArray[], UInt16 suffixByteCount, bool override, UInt32 overridePriority, UInt32 flags=OSG_READ_SUPPORTED) | |
| SceneFileType (const SceneFileType &obj) | |
Protected Attributes | |
Member | |
| std::list< IDString > | _suffixList |
| bool | _override |
| UInt32 | _overridePriority |
| UInt32 | _flags |
| std::string | _options |
Private Member Functions | |
| void | operator= (const SceneFileType &source) |
| prohibit default function (move to 'public' if needed) | |
Definition at line 60 of file OSGSceneFileType.h.
| typedef std::vector<FieldContainerPtr> osg::SceneFileType::FCPtrStore |
Reimplemented in osg::OSGSceneFileType, and osg::VRMLSceneFileType.
Definition at line 65 of file OSGSceneFileType.h.
| anonymous enum |
Definition at line 78 of file OSGSceneFileType.h.
00079 { 00080 OSG_READ_SUPPORTED = 1, 00081 OSG_WRITE_SUPPORTED = 2 00082 };
| SceneFileType::~SceneFileType | ( | void | ) | [virtual] |
Definition at line 107 of file OSGSceneFileType.cpp.
References osg::SceneFileHandler::subSceneFileType().
00108 { 00109 SceneFileHandler::subSceneFileType(*this); 00110 return; 00111 }
| SceneFileType::SceneFileType | ( | const Char8 * | suffixArray[], | |
| UInt16 | suffixByteCount, | |||
| bool | override, | |||
| UInt32 | overridePriority, | |||
| UInt32 | flags = OSG_READ_SUPPORTED | |||
| ) | [protected] |
Definition at line 71 of file OSGSceneFileType.cpp.
References _suffixList, osg::SceneFileHandler::addSceneFileType(), and FINFO.
00075 : 00076 _suffixList ( ), 00077 _override (override ), 00078 _overridePriority(overridePriority), 00079 _flags (flags ), 00080 _options ( ) 00081 { 00082 FINFO(( "Init %s Scene File Type %d\n", suffixArray[0], this )); 00083 00084 int count = (suffixByteCount / sizeof(const Char8 *)), i = 0; 00085 00086 std::list<IDString>::iterator sI; 00087 00088 _suffixList.resize(count); 00089 for (sI = _suffixList.begin(); sI != _suffixList.end(); sI++) 00090 sI->set(suffixArray[i++]); 00091 00092 SceneFileHandler::addSceneFileType(*this); 00093 }
| SceneFileType::SceneFileType | ( | const SceneFileType & | obj | ) | [protected] |
Definition at line 96 of file OSGSceneFileType.cpp.
References SWARNING.
00096 : 00097 _suffixList (obj._suffixList ), 00098 _override (obj._override ), 00099 _overridePriority(obj._overridePriority), 00100 _flags (obj._flags), 00101 _options (obj._options) 00102 { 00103 SWARNING << "In SceneFileType copy constructor" << std::endl; 00104 }
| virtual const Char8* osg::SceneFileType::getName | ( | void | ) | const [pure virtual] |
Implemented in osg::BINSceneFileType, osg::OBJSceneFileType, osg::OFFSceneFileType, osg::OSGSceneFileType, osg::RAWSceneFileType, and osg::VRMLSceneFileType.
Referenced by print(), osg::SceneFileHandler::read(), and osg::SceneFileHandler::write().
| void SceneFileType::setOptions | ( | const Char8 * | options | ) |
Definition at line 115 of file OSGSceneFileType.cpp.
References _options.
Referenced by osg::SceneFileHandler::setOptions().
00116 { 00117 _options = options; 00118 }
| std::list< IDString > & SceneFileType::suffixList | ( | void | ) | [virtual] |
Definition at line 138 of file OSGSceneFileType.cpp.
References _suffixList.
Referenced by osg::SceneFileHandler::addSceneFileType(), and osg::SceneFileHandler::subSceneFileType().
00139 { 00140 return _suffixList; 00141 }
| bool SceneFileType::doOverride | ( | void | ) |
Definition at line 145 of file OSGSceneFileType.cpp.
References _override.
Referenced by osg::SceneFileHandler::addSceneFileType(), and osg::SceneFileHandler::FindOverride::operator()().
00146 { 00147 return _override; 00148 }
| UInt32 SceneFileType::getOverridePriority | ( | void | ) |
Definition at line 152 of file OSGSceneFileType.cpp.
References _overridePriority.
Referenced by osg::SceneFileHandler::addSceneFileType(), and osg::SceneFileHandler::FindOverride::operator()().
00153 { 00154 return _overridePriority; 00155 }
| UInt32 SceneFileType::getFlags | ( | void | ) |
Definition at line 159 of file OSGSceneFileType.cpp.
References _flags.
Referenced by osg::SceneFileHandler::getSuffixList(), and osg::SceneFileHandler::print().
00160 { 00161 return _flags; 00162 }
| const Char8 * SceneFileType::getOptions | ( | void | ) |
Definition at line 166 of file OSGSceneFileType.cpp.
References _options.
Referenced by osg::SceneFileHandler::getOptions().
00167 { 00168 return _options.c_str(); 00169 }
| NodePtr SceneFileType::read | ( | std::istream & | is, | |
| const Char8 * | fileNameOrExtension | |||
| ) | const [virtual] |
Reimplemented in osg::BINSceneFileType, osg::OBJSceneFileType, osg::OFFSceneFileType, osg::OSGSceneFileType, osg::RAWSceneFileType, and osg::VRMLSceneFileType.
Definition at line 173 of file OSGSceneFileType.cpp.
References FWARNING, and osg::NullFC.
Referenced by osg::SceneFileHandler::read().
Definition at line 181 of file OSGSceneFileType.cpp.
References FWARNING, and osg::NullFC.
Referenced by osg::SceneFileHandler::read().
| bool SceneFileType::write | ( | const NodePtr & | node, | |
| std::ostream & | os, | |||
| const Char8 * | fileNameOrExtension | |||
| ) | const [virtual] |
Reimplemented in osg::BINSceneFileType, osg::OBJSceneFileType, osg::OSGSceneFileType, and osg::VRMLSceneFileType.
Definition at line 188 of file OSGSceneFileType.cpp.
References FWARNING.
Referenced by osg::SceneFileHandler::write().
00191 { 00192 FWARNING (("STREAM INTERFACE NOT IMPLEMENTED!\n")); 00193 return false; 00194 }
Definition at line 197 of file OSGSceneFileType.cpp.
References FWARNING.
Referenced by osg::SceneFileHandler::write().
00199 { 00200 FWARNING (("FILE INTERFACE NOT IMPLEMENTED!\n")); 00201 return false; 00202 }
| void SceneFileType::print | ( | void | ) |
Definition at line 121 of file OSGSceneFileType.cpp.
References _suffixList, getName(), osg::LOG_DEBUG, osg::osgLog(), and osg::Log::stream().
00122 { 00123 std::list<IDString>::iterator sI; 00124 00125 osgLog() << getName(); 00126 00127 if (_suffixList.empty()) 00128 osgLog() << "NONE"; 00129 else 00130 for (sI = _suffixList.begin(); sI != _suffixList.end(); sI++) 00131 osgLog().stream(OSG::LOG_DEBUG) << sI->str() << " "; 00132 00133 osgLog() << std::endl; 00134 }
| void osg::SceneFileType::operator= | ( | const SceneFileType & | source | ) | [private] |
Reimplemented in osg::BINSceneFileType, osg::OBJSceneFileType, osg::OFFSceneFileType, osg::OSGSceneFileType, osg::RAWSceneFileType, and osg::VRMLSceneFileType.
std::list<IDString> osg::SceneFileType::_suffixList [protected] |
Definition at line 152 of file OSGSceneFileType.h.
Referenced by print(), SceneFileType(), and suffixList().
bool osg::SceneFileType::_override [protected] |
Definition at line 154 of file OSGSceneFileType.h.
Referenced by doOverride().
UInt32 osg::SceneFileType::_overridePriority [protected] |
Definition at line 155 of file OSGSceneFileType.h.
Referenced by getOverridePriority().
UInt32 osg::SceneFileType::_flags [protected] |
Definition at line 156 of file OSGSceneFileType.h.
Referenced by getFlags().
std::string osg::SceneFileType::_options [protected] |
Definition at line 158 of file OSGSceneFileType.h.
Referenced by getOptions(), osg::VRMLSceneFileType::read(), setOptions(), and osg::VRMLSceneFileType::write().
1.6.1