FDO API Reference | Feature Data Objects |
00001 #ifndef _IDENTIFIER_H_ 00002 #define _IDENTIFIER_H_ 00003 // 00004 00005 // 00006 // Copyright (C) 2004-2006 Autodesk, Inc. 00007 // 00008 // This library is free software; you can redistribute it and/or 00009 // modify it under the terms of version 2.1 of the GNU Lesser 00010 // General Public License as published by the Free Software Foundation. 00011 // 00012 // This library is distributed in the hope that it will be useful, 00013 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00014 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00015 // Lesser General Public License for more details. 00016 // 00017 // You should have received a copy of the GNU Lesser General Public 00018 // License along with this library; if not, write to the Free Software 00019 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 00020 // 00021 00022 #ifdef _WIN32 00023 #pragma once 00024 #endif 00025 00026 #include <FdoStd.h> 00027 #include <Fdo/Expression/Expression.h> 00028 00029 /// \brief 00030 /// The FdoIdentifier class derives from FdoExpression and represents an 00031 /// identifier, such as a class name or property name. Identifiers can be just a name 00032 /// or they can be scoped to a particular context. For example, consider a Person class 00033 /// that has a DataProperty called "Name" and a ClassProperty called "Address". 00034 /// The Address class has DataProperties "Street", "City", and "Zip Code". When manipulating 00035 /// instances of a Person, the "Name" property can be referred to by the property name "Name". 00036 /// The "City" property is scoped inside the "Address" property, hence must be referred to by the 00037 /// property name "Address.City". 00038 class FdoIdentifier : public FdoExpression 00039 { 00040 protected: 00041 /// \cond DOXYGEN-IGNORE 00042 /// Constructs a default instance of an identifier. 00043 FdoIdentifier(); 00044 00045 /// Constructs an instance of an identifier using the specified arguments. 00046 FdoIdentifier(FdoString* text); 00047 00048 /// Default destructor for identifier. 00049 virtual ~FdoIdentifier(); 00050 00051 virtual void Dispose(); 00052 /// \endcond 00053 00054 public: 00055 /// \brief 00056 /// Constructs a default instance of an identifier. 00057 /// 00058 /// \return 00059 /// Returns the FdoIdentifier 00060 /// 00061 FDO_API static FdoIdentifier* Create(); 00062 00063 /// \brief 00064 /// Constructs an instance of an identifier using the specified arguments. 00065 /// 00066 /// \param text 00067 /// Input identifier text 00068 /// 00069 /// \return 00070 /// Returns the FdoIdentifier 00071 /// 00072 FDO_API static FdoIdentifier* Create(FdoString* text); 00073 00074 /// \brief 00075 /// Gets the full text of the identifier. 00076 /// 00077 /// \return 00078 /// Returns the identifier text 00079 /// 00080 FDO_API FdoString* GetText(); 00081 00082 /// \brief 00083 /// Sets the full text of the identifier. 00084 /// 00085 /// \param value 00086 /// Input identifier text 00087 /// 00088 /// \return 00089 /// Returns nothing 00090 /// 00091 FDO_API void SetText(FdoString* value); 00092 00093 /// \brief 00094 /// Gets just the name of the identifier, with any scope stripped off. 00095 /// 00096 /// \return 00097 /// Returns the name of the identifier 00098 /// 00099 FDO_API FdoString* GetName(); 00100 00101 /// \brief 00102 /// Gets the scope of the identifier as an array of strings. 00103 /// 00104 /// \param length 00105 /// Output number of strings 00106 /// 00107 /// \return 00108 /// Returns scope as array of strings 00109 /// 00110 FDO_API FdoString** GetScope(FdoInt32& length); 00111 00112 /// \brief 00113 /// Gets the schema name part of the identifier. 00114 /// 00115 /// \return 00116 /// Returns the schema name or an empty string if the schema is not part of the identifier 00117 /// 00118 FDO_API FdoString* GetSchemaName(); 00119 00120 /// \brief 00121 /// Overrides FdoExpression.Process to pass the FdoIdentifier to the appropriate 00122 /// expression processor operation. 00123 /// 00124 /// \param p 00125 /// Input expression processor interface 00126 /// 00127 /// \return 00128 /// Returns nothing 00129 /// 00130 FDO_API virtual void Process(FdoIExpressionProcessor* p); 00131 00132 /// \brief 00133 /// Returns the well defined text representation of this expression. 00134 /// 00135 /// \return 00136 /// Returns the well defined text string 00137 /// 00138 FDO_API virtual FdoString* ToString(); 00139 00140 private: 00141 wchar_t* m_text; 00142 wchar_t* m_name; 00143 wchar_t** m_scope; 00144 wchar_t* m_schemaName; 00145 FdoInt32 m_scopelen; 00146 bool generateScope; 00147 bool generateName; 00148 bool generateSchemaName; 00149 }; 00150 #endif 00151 00152
Comments or suggestions? Send us feedback. |