Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

exotkTrace_MultipleRoot.cxx

Go to the documentation of this file.
00001 
00002 //   exotkTrace_MultipleRoot.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 
00029 #include <exotkTrace_MultipleRoot.hxx>
00030 #ifndef  _exotkTrace_ListIteratorOfListOfRoot_HeaderFile
00031 #include <exotkTrace_ListIteratorOfListOfRoot.hxx>
00032 #endif
00033 
00034 //
00035 IMPLEMENT_STANDARD_HANDLE(exotkTrace_MultipleRoot, exotkTrace_Root)
00036 IMPLEMENT_STANDARD_RTTI(exotkTrace_MultipleRoot, exotkTrace_Root)
00037 //
00038 // Foreach ancestors, we add a IMPLEMENT_STANDARD_SUPERTYPE and 
00039 // a IMPLEMENT_STANDARD_SUPERTYPE_ARRAY_ENTRY macro.
00040 // We must respect the order: from the direct ancestor class
00041 // to the base class.
00042 //
00043 
00044 IMPLEMENT_STANDARD_TYPE(exotkTrace_MultipleRoot)
00045 IMPLEMENT_STANDARD_SUPERTYPE(exotkTrace_Root) 
00046 IMPLEMENT_STANDARD_SUPERTYPE(MMgt_TShared) 
00047 IMPLEMENT_STANDARD_SUPERTYPE(Standard_Transient)
00048 IMPLEMENT_STANDARD_SUPERTYPE_ARRAY()
00049 IMPLEMENT_STANDARD_SUPERTYPE_ARRAY_ENTRY(exotkTrace_Root)
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(exotkTrace_MultipleRoot)
00054 
00055 
00056 //==================================================================================
00057 // Function name        : exotkTrace_MultipleRoot::exotkTrace_MultipleRoot
00058 //==================================================================================
00059 // Written by       : Stephane Routelous - 2001-12-29 00:48:30
00060 // Description      : 
00061 // Return type          : 
00062 //==================================================================================
00063 exotkTrace_MultipleRoot::exotkTrace_MultipleRoot()
00064 {
00065 
00066 }
00067 
00068 
00069 //==================================================================================
00070 // Function name        : exotkTrace_MultipleRoot::~exotkTrace_MultipleRoot
00071 //==================================================================================
00072 // Written by       : Stephane Routelous - 2001-12-29 00:48:32
00073 // Description      : 
00074 // Return type          : 
00075 //==================================================================================
00076 exotkTrace_MultipleRoot::~exotkTrace_MultipleRoot()
00077 {
00078 
00079 }
00080 
00081 //==================================================================================
00082 // Function name        : exotkTrace_MultipleRoot::Add
00083 //==================================================================================
00084 // Written by       : Stephane Routelous - 2001-12-29 00:48:33
00085 // Description      : 
00086 // Return type          : void 
00087 //==================================================================================
00088 // Argument         : const Handle_exotkTrace_Root& aRoot
00089 void exotkTrace_MultipleRoot::Add(const Handle_exotkTrace_Root& aRoot)
00090 {
00091         myListOfRoot.Append(aRoot);
00092 }
00093 
00094 //==================================================================================
00095 // Function name        : exotkTrace_MultipleRoot::Roots
00096 //==================================================================================
00097 // Written by       : Stephane Routelous - 2002-01-13 18:34:46
00098 // Description      : 
00099 // Return type          : void 
00100 //==================================================================================
00101 // Argument         : exotkTrace_ListOfRoot& aListOfRoot
00102 void exotkTrace_MultipleRoot::Roots(exotkTrace_ListOfRoot& aListOfRoot)
00103 {
00104         aListOfRoot = myListOfRoot;
00105 }
00106 
00107 //==================================================================================
00108 // Function name        : exotkTrace_MultipleRoot::Remove
00109 //==================================================================================
00110 // Written by       : Stephane Routelous - 2001-12-29 00:48:35
00111 // Description      : 
00112 // Return type          : void 
00113 //==================================================================================
00114 // Argument         : const Handle_exotkTrace_Root& aRoot
00115 void exotkTrace_MultipleRoot::Remove(const Handle_exotkTrace_Root& aRoot)
00116 {
00117         exotkTrace_ListIteratorOfListOfRoot theIter;
00118         Standard_Boolean theRootIsFound = Standard_False;
00119         for ( theIter.Initialize(myListOfRoot) ; !theRootIsFound && theIter.More() ; theIter.Next() )
00120         {
00121                 Handle_exotkTrace_Root theRoot = theIter.Value();
00122                 if ( theRoot == aRoot )
00123                 {
00124                         theRootIsFound = Standard_True;
00125                 }
00126         }
00127         if ( theRootIsFound )
00128                 myListOfRoot.Remove(theIter);
00129 }
00130 
00131 //==================================================================================
00132 // Function name        : exotkTrace_MultipleRoot::SetLevel
00133 //==================================================================================
00134 // Written by       : Stephane Routelous - 2001-12-29 00:48:40
00135 // Description      : 
00136 // Return type          : exotkTrace_Level 
00137 //==================================================================================
00138 // Argument         : const enum exotkTrace_Level aLevel
00139 exotkTrace_Level exotkTrace_MultipleRoot::SetLevel(const enum exotkTrace_Level aLevel)
00140 {
00141         exotkTrace_ListIteratorOfListOfRoot theIter;
00142         for ( theIter.Initialize(myListOfRoot) ; theIter.More() ; theIter.Next() )
00143         {
00144                 Handle_exotkTrace_Root theRoot = theIter.Value();
00145                 theRoot->SetLevel(aLevel);
00146         }
00147         return exotkTrace_Root::SetLevel(aLevel);
00148 }
00149 
00150 //==================================================================================
00151 // Function name        : exotkTrace_MultipleRoot::IsValid
00152 //==================================================================================
00153 // Written by       : Stephane Routelous - 2001-12-29 00:48:42
00154 // Description      : 
00155 // Return type          : Standard_Boolean 
00156 //==================================================================================
00157 Standard_Boolean exotkTrace_MultipleRoot::IsValid()
00158 {
00159         return Standard_True;
00160 }
00161 
00162 //==================================================================================
00163 // Function name        : exotkTrace_MultipleRoot::Trace
00164 //==================================================================================
00165 // Written by       : Stephane Routelous - 2001-12-29 00:48:45
00166 // Description      : 
00167 // Return type          : void 
00168 //==================================================================================
00169 // Argument         : const enum exotkTrace_Level aLevel
00170 // Argument         : const Standard_CString aString
00171 void exotkTrace_MultipleRoot::Trace(const enum exotkTrace_Level aLevel,const Standard_CString aString)
00172 {
00173         exotkTrace_ListIteratorOfListOfRoot theIter;
00174         for ( theIter.Initialize(myListOfRoot) ; theIter.More() ; theIter.Next() )
00175         {
00176                 Handle_exotkTrace_Root theRoot = theIter.Value();
00177                 theRoot->Trace(aLevel,aString);
00178         }
00179 }
00180 
00181 //==================================================================================
00182 // Function name        : exotkTrace_MultipleRoot::Print
00183 //==================================================================================
00184 // Written by       : Stephane Routelous - 2001-12-29 00:48:46
00185 // Description      : 
00186 // Return type          : void 
00187 //==================================================================================
00188 // Argument         : const enum exotkTrace_Level aLevel
00189 // Argument         : const Standard_CString aString
00190 void exotkTrace_MultipleRoot::Print(const enum exotkTrace_Level aLevel,const Standard_CString aString)
00191 {
00192         exotkTrace_ListIteratorOfListOfRoot theIter;
00193         for ( theIter.Initialize(myListOfRoot) ; theIter.More() ; theIter.Next() )
00194         {
00195                 Handle_exotkTrace_Root theRoot = theIter.Value();
00196                 theRoot->Print(aLevel,aString);
00197         }
00198 }

Generated on Wed Jan 23 12:16:44 2002 for exotk by doxygen1.2.12 written by Dimitri van Heesch, © 1997-2001