00001 // **************************************************************************** 00002 // **************************************************************************** 00003 // oaCMAttr.h 00004 // 00005 // This file contains the definitions of the oaCMAttr and oaCMAttrArray classes 00006 // 00007 // oaCMAttr 00008 // The oaCMAttr class defines an attribute. An attribute is a name and 00009 // value pair. An attribue can have its value unset. 00010 // 00011 // oaCMAttrArray 00012 // The oaCMAttrArray is an array of oaCMAttrs. The oaCMAttrArray class is 00013 // used in the definition of the oaCMProtocol class. 00014 // 00015 // **************************************************************************** 00016 // Except as specified in the OpenAccess terms of use of Cadence or Silicon 00017 // Integration Initiative, this material may not be copied, modified, 00018 // re-published, uploaded, executed, or distributed in any way, in any medium, 00019 // in whole or in part, without prior written permission from Cadence. 00020 // 00021 // Copyright 2007 Cadence Design Systems, Inc. 00022 // All Rights Reserved. 00023 // 00024 // $Author: icftcm $ 00025 // $Revision: #1 $ 00026 // $Date: 2010/08/09 $ 00027 // $State: $ 00028 // **************************************************************************** 00029 // **************************************************************************** 00030 00031 00032 00033 #if !defined(oaCMAttr_P) 00034 #define oaCMAttr_P 00035 00036 00037 00038 // ***************************************************************************** 00039 // Nested includes 00040 // ***************************************************************************** 00041 #include "oaArray.h" 00042 #include "oaCMBaseTypes.h" 00043 00044 00045 00046 // ***************************************************************************** 00047 // Declare and define types in the OpenAccess namespace. 00048 // ***************************************************************************** 00049 BEGIN_OA_NAMESPACE 00050 00051 00052 00053 // ***************************************************************************** 00054 // Forward Public Class Declarations 00055 // ***************************************************************************** 00056 class oaString; 00057 00058 00059 00060 // **************************************************************************** 00061 // oaCMAttr 00062 // **************************************************************************** 00063 class OA_CM_DLL_API oaCMAttr { 00064 public: 00065 oaCMAttr(const oaString &nameIn); 00066 oaCMAttr(const oaString &nameIn, 00067 const oaString &valueIn); 00068 oaCMAttr(const oaCMAttr &attrIn); 00069 00070 const oaString &getName() const; 00071 const oaString &getValue() const; 00072 00073 void setValue(const oaString &valueIn); 00074 00075 oaCMAttr &operator=(const oaCMAttr &rhs); 00076 oaBoolean operator==(const oaCMAttr &rhs) const; 00077 oaBoolean operator!=(const oaCMAttr &rhs) const; 00078 00079 oaBoolean isUnset() const; 00080 00081 private: 00082 oaCMAttr(); 00083 00084 oaString m_name; 00085 oaString m_value; 00086 00087 template <class T> 00088 friend class oaArrayBase; 00089 template <class T> 00090 friend class oaArray; 00091 }; 00092 00093 00094 00095 // **************************************************************************** 00096 // oaCMAttrArray 00097 // **************************************************************************** 00098 class OA_CM_DLL_API oaCMAttrArray : public oaArray<oaCMAttr> { 00099 public: 00100 oaCMAttrArray(oaUInt4 sizeIn = 0); 00101 oaCMAttrArray(const oaCMAttrArray &arrayIn); 00102 00103 oaBoolean hasUnsetAttrs() const; 00104 oaUInt4 findByName(const oaString &nameIn) const; 00105 00106 oaCMAttrArray &operator=(const oaCMAttrArray &rhs); 00107 }; 00108 00109 00110 00111 END_OA_NAMESPACE 00112 00113 #endif 00114
Copyright © 2002 - 2010 Cadence Design Systems, Inc.
All Rights Reserved.