oaAppObjectDef.h

Go to the documentation of this file.
00001 // *****************************************************************************
00002 // *****************************************************************************
00003 // oaAppObjectDef.h
00004 //
00005 // This file contains the definition for the oaAppObjectDef and oaAppObject
00006 // classes. The oaAppObject class implements an object that contains
00007 // information about a particular appObject. The supporting classes include:
00008 //
00009 //  oaAppObjectDef
00010 //      This class registers an object extension with a given extension name in
00011 //      the session database.
00012 //
00013 //  oaAppObject
00014 //      This class implements an appObject. Methods for creating, deleting, and
00015 //      querying an appObjects attributes are in this class.
00016 //
00017 // *****************************************************************************
00018 // Except as specified in the OpenAccess terms of use of Cadence or Silicon
00019 // Integration Initiative, this material may not be copied, modified,
00020 // re-published, uploaded, executed, or distributed in any way, in any medium,
00021 // in whole or in part, without prior written permission from Cadence.
00022 //
00023 //                Copyright 2002-2005 Cadence Design Systems, Inc.
00024 //                           All Rights Reserved.
00025 //
00026 //  $Author: icftcm $
00027 //  $Revision: #1 $
00028 //  $Date: 2010/08/09 $
00029 //  $State: Exp $
00030 // *****************************************************************************
00031 // *****************************************************************************
00032 
00033 
00034 
00035 #if !defined(oaObjectAppDef_P)
00036 #define oaObjectAppDef_P
00037 
00038 
00039 
00040 // *****************************************************************************
00041 // Nested includes
00042 // *****************************************************************************
00043 #include "oaBaseModTypes.h"
00044 #include "oaTimeStamp.h"
00045 #include "oaSessionObject.h"
00046 
00047 
00048 
00049 // *****************************************************************************
00050 // Declare and define types in the OpenAccess namespace.
00051 // *****************************************************************************
00052 BEGIN_OA_NAMESPACE
00053 
00054 
00055 
00056 // *****************************************************************************
00057 // Forward Public Class Declarations
00058 // *****************************************************************************
00059 class oaTimeStamp;
00060 
00061 
00062 
00063 // *****************************************************************************
00064 // oaAppObjectDef
00065 // *****************************************************************************
00066 class OA_BASE_DLL_API oaAppObjectDef : public oaSessionObject {
00067 public:
00068     static oaAppObjectDef   *get(const oaString &nameIn);
00069     static oaAppObjectDef   *find(const oaString &nameIn);
00070 
00071     void                    getName(oaString &name) const;
00072 
00073     oaBoolean               isUsedIn(const oaObject *database);
00074     void                    remove(oaObject *database);
00075     oaTimeStamp             &getTimeStamp(const oaObject *database);
00076 };
00077 
00078 
00079 
00080 // *****************************************************************************
00081 // oaAppObject
00082 // *****************************************************************************
00083 class OA_BASE_DLL_API oaAppObject : public oaObject {
00084 public:
00085 
00086     static oaAppObject      *create(oaObject        *database,
00087                                     oaAppObjectDef  *def);
00088     void                    destroy();
00089 
00090     oaAppObjectDef          *getAppObjectDef() const;
00091 };
00092 
00093 
00094 
00095 // *****************************************************************************
00096 // Objects derived from oaObject
00097 // *****************************************************************************
00098 template<>
00099 class oaTraits<oaAppObject> {
00100 public:
00101     typedef oaObject                parentType;
00102     typedef oaAppObjectModTypeEnum  modTypeType;
00103     enum {domain = oacNoDomain};
00104     enum {isMultiDomain = false};
00105     enum {dbType = oacBaseDBType};
00106     enum {dtIndex = oacBaseAppObjectDataType};
00107     enum {isConcrete = true};
00108     enum {objectTypeEnumVal = oacAppObjectType};
00109     enum {dataTypeEnumVal = oacBaseAppObjectDataType};
00110 };
00111 
00112 template<>
00113 class oaTraits<oaAppObjectDef> {
00114 public:
00115     typedef oaSessionObject parentType;
00116     enum {domain = oacNoDomain};
00117     enum {isMultiDomain = false};
00118     enum {dbType = oacBaseDBType};
00119     enum {isConcrete = true};
00120     enum {objectTypeEnumVal = oacAppObjectDefType};
00121     enum {dataTypeEnumVal = oacAppObjectDefDataType};
00122 };
00123 
00124 
00125 
00126 END_OA_NAMESPACE
00127 
00128 #endif

Return to top of page