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

exotkParameter_Root.cxx

Go to the documentation of this file.
00001 
00002 //   exotkParameter_Root.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 <exotkParameter_Root.hxx>
00030 #ifndef _Standard_OStream_HeaderFile
00031 #include <Standard_OStream.hxx>
00032 #endif
00033 
00034 // Implementation of Handle and type mgt
00035 //
00036 IMPLEMENT_STANDARD_HANDLE(exotkParameter_Root,MMgt_TShared)
00037 IMPLEMENT_STANDARD_RTTI(exotkParameter_Root,MMgt_TShared)
00038 //
00039 // Foreach ancestors, we add a IMPLEMENT_STANDARD_SUPERTYPE and 
00040 // a IMPLEMENT_STANDARD_SUPERTYPE_ARRAY_ENTRY macro.
00041 // We must respect the order: from the direct ancestor class
00042 // to the base class.
00043 //
00044 
00045 IMPLEMENT_STANDARD_TYPE(exotkParameter_Root)
00046 IMPLEMENT_STANDARD_SUPERTYPE(MMgt_TShared) 
00047 IMPLEMENT_STANDARD_SUPERTYPE(Standard_Transient)
00048 IMPLEMENT_STANDARD_SUPERTYPE_ARRAY()
00049 IMPLEMENT_STANDARD_SUPERTYPE_ARRAY_ENTRY(MMgt_TShared)
00050 IMPLEMENT_STANDARD_SUPERTYPE_ARRAY_ENTRY(Standard_Transient)
00051 IMPLEMENT_STANDARD_SUPERTYPE_ARRAY_END()
00052 IMPLEMENT_STANDARD_TYPE_END(exotkParameter_Root)
00053 
00054 
00055 
00056 //==================================================================================
00057 // Function name        : exotkParameter_Root::exotkParameter_Root
00058 //==================================================================================
00059 // Written by       : Stephane Routelous - 08/03/2001 01:03:21
00060 // Description      : 
00061 // Return type          : 
00062 //==================================================================================
00063 exotkParameter_Root::exotkParameter_Root()
00064 :myName("NoName"),
00065 myLowerLimit("NoLowerLimit"),
00066 myUpperLimit("NoUpperLimit"),
00067 myType(exotkParameter_Type_Root)
00068 {
00069 }
00070 
00071 
00072 //==================================================================================
00073 // Function name        : exotkParameter_Root::~exotkParameter_Root
00074 //==================================================================================
00075 // Written by       : Stephane Routelous - 08/03/2001 01:03:22
00076 // Description      : 
00077 // Return type          : 
00078 //==================================================================================
00079 exotkParameter_Root::~exotkParameter_Root()
00080 {
00081 
00082 }
00083 
00084 //==================================================================================
00085 // Function name        : exotkParameter_Root::Type
00086 //==================================================================================
00087 // Written by       : Stephane Routelous - 08/03/2001 01:03:25
00088 // Description      : 
00089 // Return type          : exotkParameter_Type 
00090 //==================================================================================
00091 exotkParameter_Type exotkParameter_Root::Type() const
00092 {
00093         return myType;
00094 }
00095 
00096 //==================================================================================
00097 // Function name        : exotkParameter_Root::Name
00098 //==================================================================================
00099 // Written by       : Stephane Routelous - 08/03/2001 01:03:31
00100 // Description      : 
00101 // Return type          : TCollection_AsciiString 
00102 //==================================================================================
00103 TCollection_AsciiString exotkParameter_Root::Name() const
00104 {
00105         return myName;
00106 }
00107 
00108 //==================================================================================
00109 // Function name        : exotkParameter_Root::SetName
00110 //==================================================================================
00111 // Written by       : Stephane Routelous - 08/03/2001 01:03:32
00112 // Description      : 
00113 // Return type          : void 
00114 //==================================================================================
00115 // Argument         : const TCollection_AsciiString& aName
00116 void exotkParameter_Root::SetName(const TCollection_AsciiString& aName)
00117 {
00118         myName = aName;
00119 }
00120 
00121 //==================================================================================
00122 // Function name        : exotkParameter_Root::Limits
00123 //==================================================================================
00124 // Written by       : Stephane Routelous - 08/03/2001 01:03:35
00125 // Description      : 
00126 // Return type          : void 
00127 //==================================================================================
00128 // Argument         : TCollection_AsciiString& aLowerParameter
00129 // Argument         : TCollection_AsciiString& anUpperParameter
00130 void exotkParameter_Root::Limits(TCollection_AsciiString& aLowerParameter,TCollection_AsciiString& anUpperParameter)
00131 {
00132         aLowerParameter = myLowerLimit;
00133         anUpperParameter = myUpperLimit;
00134 }
00135 
00136 
00137 //==================================================================================
00138 // Function name        : exotkParameter_Root::Dump
00139 //==================================================================================
00140 // Written by       : Stephane Routelous - 08/03/2001 01:03:41
00141 // Description      : 
00142 // Return type          : Standard_OStream& 
00143 //==================================================================================
00144 // Argument         : Standard_OStream& anOS
00145 Standard_OStream& exotkParameter_Root::Dump(Standard_OStream& anOS) const
00146 {
00147         anOS <<DynamicType()->Name() << " Name=" << myName << " Value=" << ParameterAsString().ToCString();
00148         anOS <<" Limits(" << myLowerLimit << ";" << myUpperLimit<<")"<< endl;
00149         return anOS;
00150 }
00151 
00152 
00153 //==================================================================================
00154 // Function name        : exotkParameter_Root::DeepCopy
00155 //==================================================================================
00156 // Written by       : Stephane Routelous - 21/03/2001 22:35:19
00157 // Description      : 
00158 // Return type          : void 
00159 //==================================================================================
00160 // Argument         : const Handle_exotkParameter_Root &aParameterToCopy
00161 void exotkParameter_Root::DeepCopy(const Handle_exotkParameter_Root &aParameterToCopy)
00162 {
00163         aParameterToCopy->Limits(myLowerLimit,myUpperLimit);
00164         myName = aParameterToCopy->Name();
00165         myType = aParameterToCopy->Type();
00166 
00167 }
00168 
00169 
00170 //==================================================================================
00171 // Function name        : exotkParameter_Root::IsCompatible
00172 //==================================================================================
00173 // Written by       : Stephane Routelous - 2001-11-20 16:04:58
00174 // Description      : 
00175 // Return type          : Standard_Boolean 
00176 //==================================================================================
00177 // Argument         : const Handle_exotkParameter_Root &anOther
00178 Standard_Boolean exotkParameter_Root::IsCompatible(const Handle_exotkParameter_Root &anOther)
00179 {
00180         Standard_Boolean theIsCompatible = Standard_False;
00181         if (myType == anOther->Type())
00182         {
00183                 if ( myName == anOther->Name() )
00184                 {
00185                         theIsCompatible = Standard_True;
00186                 }
00187         }
00188         return theIsCompatible;
00189 }

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