oaEnumProp.h

Go to the documentation of this file.
00001 // *****************************************************************************
00002 // *****************************************************************************
00003 // oaEnumProp.h
00004 //
00005 // This file contains the definitions for the oaEnumProp class. This class
00006 // implements an enumeration-type property.
00007 //
00008 // *****************************************************************************
00009 // Except as specified in the OpenAccess terms of use of Cadence or Silicon
00010 // Integration Initiative, this material may not be copied, modified,
00011 // re-published, uploaded, executed, or distributed in any way, in any medium,
00012 // in whole or in part, without prior written permission from Cadence.
00013 //
00014 //                Copyright 2002-2005 Cadence Design Systems, Inc.
00015 //                           All Rights Reserved.
00016 //
00017 //  $Author: icftcm $
00018 //  $Revision: #1 $
00019 //  $Date: 2010/08/09 $
00020 //  $State: Exp $
00021 // *****************************************************************************
00022 // *****************************************************************************
00023 
00024 
00025 
00026 #if !defined(oaEnumProp_P)
00027 #define oaEnumProp_P
00028 
00029 
00030 
00031 // *****************************************************************************
00032 // Nested includes
00033 // *****************************************************************************
00034 #include "oaProp.h"
00035 #include "oaStringArray.h"
00036 
00037 
00038 
00039 // *****************************************************************************
00040 // Declare and define types in the OpenAccess namespace.
00041 // *****************************************************************************
00042 BEGIN_OA_NAMESPACE
00043 
00044 
00045 
00046 // *****************************************************************************
00047 // Forward Public Class Declarations
00048 // *****************************************************************************
00049 class oaEnumCollection;
00050 
00051 
00052 
00053 // *****************************************************************************
00054 // oaEnumProp
00055 // *****************************************************************************
00056 class OA_BASE_DLL_API oaEnumProp : public oaProp {
00057 public:
00058 #if !defined(OA_DEPRECATED)
00059     static oaEnumProp       *create(oaObject        *object,
00060                                     const oaString  &name,
00061                                     const oaString  &value,
00062                                     oaUInt4         numEnums,
00063                                     const oaString  *enums);
00064 #endif
00065 
00066     static oaEnumProp       *create(oaObject            *object,
00067                                     const oaString      &name,
00068                                     const oaString      &value,
00069                                     const oaStringArray &enums);
00070 
00071     void                    getValue(oaString &value) const;
00072 
00073     void                    setValue(const oaString &value);
00074 
00075     oaEnumCollection        getEnums() const;
00076 };
00077 
00078 
00079 
00080 // *****************************************************************************
00081 // Traits
00082 // *****************************************************************************
00083 template<>
00084 class oaTraits<oaEnumProp> {
00085 public:
00086     typedef oaPropModTypeEnum   modTypeType;
00087     typedef oaProp              parentType;
00088     enum {dtIndex = oacBasePropDataType};
00089     enum {dataTypeEnumVal = oacBasePropDataType};
00090     enum {domain = oacNoDomain};
00091     enum {isMultiDomain = false};
00092     enum {dbType = oacBaseDBType};
00093     enum {isConcrete = true};
00094     enum {objectTypeEnumVal = oacEnumPropType};
00095 };
00096 
00097 
00098 
00099 END_OA_NAMESPACE
00100 
00101 #endif
00102 

Return to top of page