00001 // ***************************************************************************** 00002 // ***************************************************************************** 00003 // oaHierPath.h 00004 // 00005 // This file contains the definitions for the oaHierPath and oaHierPathElement 00006 // classes. These utility classes implement methods for referring to a specific 00007 // reference of a design hierarchy. A hierarchical path is composed of an array 00008 // that contains the elements of the path and the depth of the path. Methods are 00009 // implemented that allow applications to examine the contents of the path. 00010 // 00011 // ***************************************************************************** 00012 // Except as specified in the OpenAccess terms of use of Cadence or Silicon 00013 // Integration Initiative, this material may not be copied, modified, 00014 // re-published, uploaded, executed, or distributed in any way, in any medium, 00015 // in whole or in part, without prior written permission from Cadence. 00016 // 00017 // Copyright 2002-2005 Cadence Design Systems, Inc. 00018 // All Rights Reserved. 00019 // 00020 // $Author: icftcm $ 00021 // $Revision: #1 $ 00022 // $Date: 2010/08/09 $ 00023 // $State: Exp $ 00024 // ***************************************************************************** 00025 // ***************************************************************************** 00026 00027 00028 00029 #if !defined(oaHierPath_P) 00030 #define oaHierPath_P 00031 00032 00033 00034 // ***************************************************************************** 00035 // Nested includes 00036 // ***************************************************************************** 00037 #include "oaRef.h" 00038 00039 00040 00041 // ***************************************************************************** 00042 // Declare and define types in the OpenAccess namespace. 00043 // ***************************************************************************** 00044 BEGIN_OA_NAMESPACE 00045 00046 00047 00048 // ***************************************************************************** 00049 // oaHierPathElement 00050 // ***************************************************************************** 00051 class OA_DESIGN_DLL_API oaHierPathElement { 00052 oaRef *ref; 00053 oaUInt4 row; 00054 oaUInt4 col; 00055 00056 friend class oaHierPath; 00057 }; 00058 00059 00060 00061 // ***************************************************************************** 00062 // oaHierPath 00063 // ***************************************************************************** 00064 class OA_DESIGN_DLL_API oaHierPath { 00065 public: 00066 oaHierPath(oaUInt4 sizeIn = 10); 00067 oaHierPath(const oaHierPath &pathIn); 00068 ~oaHierPath(); 00069 00070 oaHierPath &operator=(const oaHierPath &pathIn); 00071 oaBoolean operator==(const oaHierPath &pathIn) const; 00072 oaBoolean operator!=(const oaHierPath &pathIn) const; 00073 00074 void pushLevel(oaRef *ref, 00075 oaUInt4 row = 0, 00076 oaUInt4 col = 0); 00077 void popLevel(); 00078 00079 void setSize(oaUInt4 sizeIn); 00080 void setLevel(oaUInt4 level, 00081 oaRef *ref, 00082 oaUInt4 row, 00083 oaUInt4 col); 00084 00085 void reset(); 00086 00087 oaUInt4 getDepth() const; 00088 void getLevel(oaUInt4 index, 00089 oaRef *&ref, 00090 oaUInt4 &row, 00091 oaUInt4 &col) const; 00092 00093 void getTransform(oaTransform &result) const; 00094 00095 private: 00096 oaHierPathElement *array; 00097 oaUInt4 depth; 00098 oaUInt4 size; 00099 }; 00100 00101 00102 00103 END_OA_NAMESPACE 00104 00105 #endif
Copyright © 2002 - 2010 Cadence Design Systems, Inc.
All Rights Reserved.