oaSession.h

Go to the documentation of this file.
00001 // *****************************************************************************
00002 // *****************************************************************************
00003 // oaSession.h
00004 //
00005 // This file contains the definition for the oaSession class and its public
00006 // supporting classes. The oaSession class implements a session database. This
00007 // is a non-persistent database which is used as a parent for session-wide
00008 // information.
00009 //
00010 // A session database is automatically created and maintained as needed by the
00011 // OA implementation. There is only one session database per OA session.
00012 //
00013 // *****************************************************************************
00014 // Except as specified in the OpenAccess terms of use of Cadence or Silicon
00015 // Integration Initiative, this material may not be copied, modified,
00016 // re-published, uploaded, executed, or distributed in any way, in any medium,
00017 // in whole or in part, without prior written permission from Cadence.
00018 //
00019 //                Copyright 2002-2010 Cadence Design Systems, Inc.
00020 //                           All Rights Reserved.
00021 //
00022 //  $Author: icftcm $
00023 //  $Revision: #1 $
00024 //  $Date: 2010/08/09 $
00025 //  $State$
00026 // *****************************************************************************
00027 // *****************************************************************************
00028 
00029 
00030 
00031 #if !defined(oaSession_P)
00032 #define oaSession_P
00033 
00034 
00035 
00036 // *****************************************************************************
00037 // Nested includes
00038 // *****************************************************************************
00039 #include "oaSessionObject.h"
00040 
00041 
00042 
00043 // *****************************************************************************
00044 // Declare and define types in the OpenAccess namespace.
00045 // *****************************************************************************
00046 BEGIN_OA_NAMESPACE
00047 
00048 
00049 
00050 // *****************************************************************************
00051 // Forward Public Class Declarations
00052 // *****************************************************************************
00053 class oaAppObjectDef;
00054 class oaConstraintParamDef;
00055 class oaConstraintDef;
00056 class oaGroupDef;
00057 class oaConstraintGroupDef;
00058 
00059 
00060 
00061 // *****************************************************************************
00062 // oaThreadUseModel
00063 // *****************************************************************************
00064 class OA_BASE_DLL_API oaThreadUseModel {
00065 public:
00066                             oaThreadUseModel(oaThreadUseModelEnum valueIn);
00067                             oaThreadUseModel(const oaString &name);
00068                             ~oaThreadUseModel();
00069 
00070     const oaString          &getName() const;
00071     operator                oaThreadUseModelEnum() const;
00072 
00073 private:
00074     static const oaString   *initNames();
00075     oaThreadUseModelEnum    value;
00076 };
00077 
00078 
00079 
00080 // *****************************************************************************
00081 // oaSession
00082 // *****************************************************************************
00083 class OA_BASE_DLL_API oaSession : public oaSessionObject {
00084 public:
00085     oaUInt8                                         calcVMSize() const;
00086     void                                            minimizeVM();
00087 
00088     oaCollection<oaAppDef, oaSession>               getAppDefs();
00089     oaCollection<oaAppObjectDef, oaSession>         getAppObjectDefs();
00090     oaCollection<oaConstraintParamDef, oaSession>   getConstraintParamDefs() const;
00091     oaCollection<oaConstraintDef, oaSession>        getConstraintDefs() const;
00092     oaCollection<oaDerivedLayerParamDef, oaSession> getDerivedLayerParamDefs() const;
00093     oaCollection<oaDerivedLayerDef, oaSession>      getDerivedLayerDefs() const;
00094     oaCollection<oaGroupDef, oaSession>             getGroupDefs() const;
00095     oaCollection<oaConstraintGroupDef, oaSession>   getConstraintGroupDefs() const;
00096 
00097     void                                            setThreadUseModel(oaThreadUseModel  useModelIn);
00098     oaThreadUseModel                                getThreadUseModel() const;
00099 
00100     static oaSession                                *get();
00101 };
00102 
00103 
00104 
00105 // *****************************************************************************
00106 // Traits
00107 // *****************************************************************************
00108 template<>
00109 class oaTraits<oaSession> {
00110 public:
00111     typedef oaSessionObject parentType;
00112     enum {domain = oacNoDomain};
00113     enum {isMultiDomain = false};
00114     enum {dbType = oacBaseDBType};
00115     enum {isConcrete = true};
00116     enum {objectTypeEnumVal = oacSessionType};
00117 };
00118 
00119 
00120 
00121 END_OA_NAMESPACE
00122 
00123 #endif
00124 

Return to top of page