00001 00002 // 00003 // Title : CoordinateSpace.h 00004 // Project : OSCAR Version 2.0 00005 // Created : 7/10/2002 00006 // Author : Chetan Kapoor 00007 // Platforms : All 00008 // Copyright : The University of Texas at Austin, 2002. All rights reserved. 00009 // 00010 // This software and documentation constitute an unpublished work 00011 // and contain valuable trade secrets and proprietary information 00012 // belonging to the University. None of the foregoing material may be 00013 // copied or duplicated or disclosed without the express, written 00014 // permission of University. THE UNIVERSITY EXPRESSLY DISCLAIMS ANY 00015 // AND ALL WARRANTIES CONCERNING THIS SOFTWARE AND DOCUMENTATION, 00016 // INCLUDING ANY WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A 00017 // PARTICULAR PURPOSE, AND WARRANTIES OF PERFORMANCE, AND ANY WARRANTY 00018 // THAT MIGHT OTHERWISE ARISE FROM COURSE OF DEALING OR USAGE OF TRADE. 00019 // NO WARRANTY IS EITHER EXPRESS OR IMPLIED WITH RESPECT TO THE USE OF 00020 // THE SOFTWARE OR DOCUMENTATION. Under no circumstances shall the 00021 // University be liable for incidental, special, indirect, direct or 00022 // consequential damages or loss of profits, interruption of business, 00023 // or related expenses which may arise from use of software or documentation, 00024 // including but not limited to those resulting from defects in software 00025 // and/or documentation, or loss or inaccuracy of data of any kind. 00026 // 00027 // Purpose : CoordinateSpace declares the class CoordinateSpace. 00028 // 00029 //----------------------------------------------------------------------------- 00030 // 00031 // $Revisions$ 00032 // 00033 // $Log: CoordinateSpace.h,v $ 00034 // Revision 1.10 2005/03/18 23:05:22 chetan 00035 // Fixed g++ compile warnings. Removed virtual inheritance from Base, added initialization of base class in copy constructors, added newline at EOF 00036 // 00037 // Revision 1.9 2005/03/14 22:04:13 pmarch 00038 // Added to namespace OSCAR and removed "RR" from front of class names. 00039 // 00040 // Revision 1.8 2004/07/19 16:37:05 edjung 00041 // -made fix to constructors for ANSI C++ compliance with temporary OSCARError objects 00042 // -added DUMMY_ERROR class 00043 // 00044 // Revision 1.7 2004/06/10 19:11:57 aspencer 00045 // Added /ingroup tags. 00046 // 00047 // Revision 1.6 2004/06/08 22:58:05 chetan 00048 // Added the Grow method 00049 // 00050 // Revision 1.5 2004/05/26 20:02:03 pmarch 00051 // Added /defgroup and /ingroup tags. 00052 // 00053 // Revision 1.4 2003/09/09 17:13:14 eswint 00054 // - Changed #include "Math/..." to #include "..." 00055 // 00056 // Revision 1.3 2003/09/05 16:56:31 eswint 00057 // - Eliminated unused member variable spaceDim 00058 // 00059 // Revision 1.2 2003/09/04 22:48:00 eswint 00060 // - Change default arguments: OSCARError(0,"No Error"...) to OSCARError(noError) and String(" ") to String("") 00061 // 00062 // Revision 1.1 2003/08/18 15:23:43 eswint 00063 // Initial Commit 00064 // 00065 // 00067 #ifndef CoordinateSpace_h 00068 #define CoordinateSpace_h 00069 00070 #include "Base/Base.h" 00071 #include "Base/BaseError.h" 00072 #include "Array.h" //for RRCoordinateStatusArray 00073 00075 namespace OSCAR { 00076 00084 enum CoordinateStatus { Active = true, Inactive = false}; 00085 00086 00091 typedef Array<enum CoordinateStatus> CoordinateStatusArray; 00092 00104 class CoordinateSpace : public Base { 00105 public: 00106 00117 CoordinateSpace(unsigned int spaceDim, OSCARError& err = DUMMY_ERROR(noError)); 00118 00126 CoordinateSpace(const CoordinateStatusArray& coordinateStatus); 00127 00134 CoordinateSpace(const CoordinateSpace& rhs); 00135 00141 virtual ~CoordinateSpace(); 00142 00151 CoordinateSpace& operator=(const CoordinateSpace& rhs); 00152 00159 unsigned int GetActiveDimensionSize() const; 00160 00167 unsigned int GetDimensionSize() const; 00168 00179 bool SetCoordinateStatus(unsigned int coordNo, CoordinateStatus status); 00180 00190 bool SetCoordinateStatus(const CoordinateStatusArray& statusArray); 00191 00198 void SetAllCoordinateStatus(const CoordinateStatus& status); 00199 00211 bool GetCoordinateStatus(unsigned int coordNo, CoordinateStatus& status); 00212 00222 CoordinateStatus GetCoordinateStatus(unsigned int coordNo) const; 00223 00233 bool GetCoordinateStatus(CoordinateStatusArray& statusArray); 00234 00241 const CoordinateStatusArray& GetCoordinateStatus() const; 00242 00250 bool Grow(unsigned int growth); 00251 00252 protected: 00253 00254 //holds the Active/InActive status of each coordinate 00255 CoordinateStatusArray *coordinateStatus; 00256 //number of dimensions that are active 00257 unsigned int activeSpaceDim; 00258 00265 void updateActiveDimSize(); 00266 00267 }; //End of CoordinateSpace 00268 00269 #include "CoordinateSpace.ipp" 00270 } 00271 #endif //CoordinateSpace_h 00272
| RRG Homepage | OSCAR Overview | OSCAR Tutorials | Simulations |