oaFigGroup.h

Go to the documentation of this file.
00001 // *****************************************************************************
00002 // *****************************************************************************
00003 // oaFigGroup.h
00004 //
00005 // This file contains the definition for the oaFigGroup class and its public
00006 // supporting classes. oaFigGroup is a container object used to encapsulate a
00007 // number of oaFigs such that they can be treated as a single oaFig object.
00008 // An oaFigGroup is itself an oaFig, so oaFigGroups can be nested within one
00009 // another.
00010 //
00011 // The public supporting class included here is:
00012 //
00013 //  oaFigGroupMem
00014 //      Each fig is encapsulated in an oaFigGroupMem for membership in an
00015 //      oaFigGroup.
00016 //
00017 //  oaFigGroupStatus
00018 //      The oaFigGroupStatus type describes the values that the status of an
00019 //      oaFigGroup can take.
00020 //
00021 // *****************************************************************************
00022 // Except as specified in the OpenAccess terms of use of Cadence or Silicon
00023 // Integration Initiative, this material may not be copied, modified,
00024 // re-published, uploaded, executed, or distributed in any way, in any medium,
00025 // in whole or in part, without prior written permission from Cadence.
00026 //
00027 //                Copyright 2005 Cadence Design Systems, Inc.
00028 //                           All Rights Reserved.
00029 //
00030 //  $Author: icftcm $
00031 //  $Revision: #1 $
00032 //  $Date: 2010/08/09 $
00033 //  $State$
00034 // *****************************************************************************
00035 // *****************************************************************************
00036 
00037 #if !defined(oaFigGroup_P)
00038 #define oaFigGroup_P
00039 
00040 
00041 
00042 // *****************************************************************************
00043 // Nested includes
00044 // *****************************************************************************
00045 #include "oaFig.h"
00046 #include "oaBlock.h"
00047 
00048 
00049 
00050 // *****************************************************************************
00051 // Declare and define types in the OpenAccess namespace.
00052 // *****************************************************************************
00053 BEGIN_OA_NAMESPACE
00054 
00055 
00056 
00057 // *****************************************************************************
00058 // oaFigGroupStatusEnum
00059 // *****************************************************************************
00060 #define oavNumFigGroupStatusTypes  3
00061 
00062 enum oaFigGroupStatusEnum {
00063     oacNormalFigGroupStatus = 0,
00064     oacFixedFigGroupStatus  = 1,
00065     oacLockedFigGroupStatus = 2
00066 };
00067 
00068 
00069 
00070 // *****************************************************************************
00071 // oaFigGroupStatus
00072 // *****************************************************************************
00073 class OA_DESIGN_DLL_API oaFigGroupStatus {
00074 public:         
00075                             oaFigGroupStatus(oaFigGroupStatusEnum valueIn);
00076                             oaFigGroupStatus(const oaString &name);
00077 
00078     const oaString          &getName() const;
00079 
00080                             operator                oaFigGroupStatusEnum() const;
00081 
00082 private:
00083     static const oaString   *initNames();
00084 
00085     oaFigGroupStatusEnum    value;
00086 
00087     static const oaString   *names;
00088 };
00089 
00090 
00091 
00092 // *****************************************************************************
00093 // oaFigGroup
00094 // *****************************************************************************
00095 class OA_DESIGN_DLL_API oaFigGroup : public oaFig {
00096 public:
00097     static oaFigGroup                       *create(const oaBlock       *block,
00098                                                     const oaSimpleName  &name,
00099                                                     oaBoolean           ordered = false);
00100     static oaFigGroup                       *create(const oaBlock   *block,
00101                                                     oaBoolean       ordered = false);
00102 
00103     static oaFigGroup                       *find(const oaBlock         *block,
00104                                                   const oaSimpleName    &name);
00105 
00106     void                                    getName(oaSimpleName &name) const;
00107     void                                    getName(const oaNameSpace   &ns,
00108                                                     oaString            &name) const;
00109     void                                    getTransform(oaTransform &xform) const;
00110     void                                    getOrigin(oaPoint &origin) const;
00111     oaOrient                                getOrient() const;
00112     oaFigGroupStatus                        getFigGroupStatus() const;
00113     oaBoolean                               hasDefaultConstraintGroup() const;
00114     oaConstraintGroup                       *getDefaultConstraintGroup() const;
00115     oaBoolean                               isOrdered() const;
00116 
00117     void                                    setName(const oaSimpleName &name);
00118     void                                    setTransform(const oaTransform &xform);
00119     void                                    setOrigin(const oaPoint &origin);
00120     void                                    setOrient(oaOrient orient);
00121     void                                    setFigGroupStatus(oaFigGroupStatus status);
00122     void                                    setOrdered(oaBoolean ordered = true);
00123 
00124     void                                    destroyFigs(oaBoolean recurse = true);
00125 
00126     oaCollection<oaFigGroupMem, oaFigGroup> getMembers() const;
00127 
00128     enum {dtIndex = oacFigGroupDataType};
00129 };
00130 
00131 
00132 
00133 // *****************************************************************************
00134 // oaFigGroupMem
00135 // *****************************************************************************
00136 class OA_DESIGN_DLL_API oaFigGroupMem : public oaBlockObject {
00137 public:
00138     static oaFigGroupMem    *create(oaFigGroup  *figGroup,
00139                                     oaFig       *fig);
00140 
00141     void                    destroy();
00142 
00143     oaFigGroup              *getFigGroup() const;
00144     oaFig                   *getFig() const;
00145 
00146     void                    moveAfter(oaFigGroupMem *mem);
00147     void                    moveToFirst();
00148 
00149     enum {dtIndex = oacFigGroupMemDataType};
00150 };
00151 
00152 
00153 
00154 // *****************************************************************************
00155 // Design Traits.
00156 // *****************************************************************************
00157 template<>
00158 class oaTraits<oaFigGroup> {
00159 public:
00160     typedef oaFig                   parentType;
00161     typedef oaFigGroupModTypeEnum   modTypeType;
00162     enum {domain = oacBlockDomain};
00163     enum {dbType = oacDesignDBType};
00164     enum {isMultiDomain = false};
00165     enum {dtIndex = oacFigGroupDataType};
00166     enum {isConcrete = true};
00167     enum {objectTypeEnumVal = oacFigGroupType};
00168     enum {dataTypeEnumVal = oacFigGroupDataType};
00169 };
00170 
00171 template<>
00172 class oaTraits<oaFigGroupMem> {
00173 public:
00174     typedef oaBlockObject               parentType;
00175     typedef oaFigGroupMemModTypeEnum    modTypeType;
00176     enum {domain = oacBlockDomain};
00177     enum {dbType = oacDesignDBType};
00178     enum {isMultiDomain = false};
00179     enum {dtIndex = oacFigGroupMemDataType};
00180     enum {isConcrete = true};
00181     enum {objectTypeEnumVal = oacFigGroupMemType};
00182     enum {dataTypeEnumVal = oacFigGroupMemDataType};
00183 };
00184 
00185 
00186 
00187 END_OA_NAMESPACE
00188 
00189 #endif

Return to top of page