- Main Page
- Related Pages
- Modules
- Classes
- Files

# StringValue.h

Go to the documentation of this file.

    00001 #ifndef _STRINGVALUE_H_
    00002 #define _STRINGVALUE_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/DataValue.h>
    00028 #include <Fdo/Schema/DataType.h>
    00029
    00030 /// \brief
    00031 /// The FdoStringValue class derives from FdoDataValue and represents a literal string.
    00032 class FdoStringValue : public FdoDataValue
    00033 {
    00034 /// \cond DOXYGEN-IGNORE
    00035 protected:
    00036     /// \brief
    00037     /// Constructs a default instance of an FdoStringValue with a
    00038     /// value of null.
    00039     /// \return
    00040     /// Returns nothing
    00041     ///
    00042     FdoStringValue();
    00043
    00044     /// \brief
    00045     /// Constructs a default instance of an FdoStringValue using the specified arguments.
    00046     /// \return
    00047     /// Returns nothing
    00048     ///
    00049     FdoStringValue(FdoString* value);
    00050
    00051     /// \brief
    00052     /// Default destructor for FdoStringValue.
    00053     virtual ~FdoStringValue();
    00054
    00055     virtual void Dispose();
    00056 /// \endcond
    00057
    00058 public:
    00059     /// \brief
    00060     /// Constructs a default instance of an FdoStringValue with a value of null.
    00061     ///
    00062     /// \return
    00063     /// Returns the created FdoStringValue
    00064     ///
    00065     FDO_API static FdoStringValue* Create();
    00066
    00067     /// \brief
    00068     /// Constructs a default instance of an FdoStringValue using the specified arguments.
    00069     ///
    00070     /// \param value
    00071     /// Input a character string
    00072     ///
    00073     /// \return
    00074     /// Returns the created FdoStringValue
    00075     ///
    00076     FDO_API static FdoStringValue* Create(FdoString* value);
    00077
    00078     /// \brief
    00079     /// Gets the data type of the FdoStringValue.
    00080     ///
    00081     /// \return
    00082     /// Returns FdoDataType
    00083     ///
    00084     FDO_API FdoDataType GetDataType();
    00085
    00086     /// \brief
    00087     /// Gets the FdoStringValue as a string.
    00088     ///
    00089     /// \return
    00090     /// Returns a character string
    00091     ///
    00092     FDO_API FdoString* GetString();
    00093
    00094     /// \brief
    00095     /// Sets the FdoStringValue as a string.
    00096     ///
    00097     /// \param value
    00098     /// Input a character string
    00099     ///
    00100     /// \return
    00101     /// Returns nothing
    00102     ///
    00103     FDO_API void SetString(FdoString* value);
    00104
    00105     /// \brief
    00106     /// Sets the FdoStringValue to a null value.
    00107     ///
    00108     /// \return
    00109     /// Returns nothing
    00110     ///
    00111     FDO_API void SetNull();
    00112
    00113     /// \brief
    00114     /// Overrides FdoExpression.Process to pass the FdoStringValue to the appropriate
    00115     /// expression processor operation.
    00116     ///
    00117     /// \param p
    00118     /// Input an FdoIExpressionProcessor
    00119     ///
    00120     /// \return
    00121     /// Returns nothing
    00122     ///
    00123     FDO_API void Process(FdoIExpressionProcessor* p);
    00124
    00125     /// \brief
    00126     /// Returns the well defined text representation of this expression.
    00127     ///
    00128     /// \return
    00129     /// Returns a character string
    00130     ///
    00131     FDO_API FdoString* ToString();
    00132
    00133     /// \brief
    00134     /// A cast operator to get the string.
    00135     ///
    00136     /// \return
    00137     /// Returns a character string
    00138     ///
    00139     FDO_API operator wchar_t*()
    00140     {
    00141         return m_data;
    00142     }
    00143
    00144 protected:
    00145     // See FdoDataValue::DoCompare()
    00146     virtual FdoCompareType DoCompare( FdoDataValue* other );
    00147
    00148     wchar_t*    m_data;
    00149     size_t      m_allocatedSize;
    00150 };
    00151 #endif
    00152
    00153

Please send us your comment about this page