00001 00002 // exotkDX_FormatDescriptor.cxx 00004 // Copyright (C) 2001 Stephane Routelous 00005 // 00006 // This file is part of exoTK. 00007 // 00008 // exoTK is free software; you can redistribute it and/or modify 00009 // it under the terms of the GNU General Public License as published by 00010 // the Free Software Foundation; either version 2 of the License, or 00011 // (at your option) any later version. 00012 // 00013 // exoTK is distributed in the hope that it will be useful, 00014 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00015 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00016 // GNU General Public License for more details. 00017 // 00018 // You should have received a copy of the GNU General Public License 00019 // along with exoTK; if not, write to the Free Software 00020 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00022 00028 #include <exotkDX_FormatDescriptor.hxx> 00029 #ifndef _TColStd_HSequenceOfAsciiString_HeaderFile 00030 #include <TColStd_HSequenceOfAsciiString.hxx> 00031 #endif 00032 #ifndef _exotkDX_Root_HeaderFile 00033 #include <exotkDX_Root.hxx> 00034 #endif 00035 00036 // 00037 IMPLEMENT_STANDARD_HANDLE(exotkDX_FormatDescriptor, MMgt_TShared) 00038 IMPLEMENT_STANDARD_RTTI(exotkDX_FormatDescriptor, MMgt_TShared) 00039 // 00040 // Foreach ancestors, we add a IMPLEMENT_STANDARD_SUPERTYPE and 00041 // a IMPLEMENT_STANDARD_SUPERTYPE_ARRAY_ENTRY macro. 00042 // We must respect the order: from the direct ancestor class 00043 // to the base class. 00044 // 00045 00046 IMPLEMENT_STANDARD_TYPE(exotkDX_FormatDescriptor) 00047 IMPLEMENT_STANDARD_SUPERTYPE(MMgt_TShared) 00048 IMPLEMENT_STANDARD_SUPERTYPE(Standard_Transient) 00049 IMPLEMENT_STANDARD_SUPERTYPE_ARRAY() 00050 IMPLEMENT_STANDARD_SUPERTYPE_ARRAY_ENTRY(MMgt_TShared) 00051 IMPLEMENT_STANDARD_SUPERTYPE_ARRAY_ENTRY(Standard_Transient) 00052 IMPLEMENT_STANDARD_SUPERTYPE_ARRAY_END() 00053 IMPLEMENT_STANDARD_TYPE_END(exotkDX_FormatDescriptor) 00054 00055 exotkDX_FormatDescriptor::exotkDX_FormatDescriptor(const Handle_exotkDX_Root& aRoot) 00056 { 00057 if ( !aRoot.IsNull() ) 00058 { 00059 myName = aRoot->FormatName(); 00060 myExtensions = aRoot->FormatExtensions(); 00061 } 00062 } 00063 00064 exotkDX_FormatDescriptor::~exotkDX_FormatDescriptor() 00065 { 00066 00067 } 00068 Standard_Boolean exotkDX_FormatDescriptor::IsValid() 00069 { 00070 return ( !myName.IsEmpty() && !myExtensions.IsNull() && !myExtensions->IsEmpty() ); 00071 } 00072 TCollection_AsciiString exotkDX_FormatDescriptor::Name() 00073 { 00074 return myName; 00075 } 00076 Handle_TColStd_HSequenceOfAsciiString exotkDX_FormatDescriptor::Extensions() 00077 { 00078 return myExtensions; 00079 }
1.2.12 written by Dimitri van Heesch,
© 1997-2001