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

# Int64Value.h

Go to the documentation of this file.

    00001 #ifndef _INT64VALUE_H_
    00002 #define _INT64VALUE_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 FdoInt64Value class derives from FdoDataValue and represents a 64-bit signed integer value.
    00032 class FdoInt64Value : public FdoDataValue
    00033 {
    00034 /// \cond DOXYGEN-IGNORE
    00035     friend class FdoByteValue;
    00036     friend class FdoInt16Value;
    00037     friend class FdoInt32Value;
    00038 protected:
    00039     /// \brief
    00040     /// Constructs a default instance of an FdoInt64Value with a
    00041     /// value of null.
    00042     /// \return
    00043     /// Returns nothing
    00044     ///
    00045     FdoInt64Value();
    00046
    00047     /// \brief
    00048     /// Constructs a default instance of an FdoInt64Value using the specified arguments.
    00049     /// \param value
    00050     /// Input a 64 bit integer
    00051     ///
    00052     /// \return
    00053     /// Returns nothing
    00054     ///
    00055     FdoInt64Value(FdoInt64 value);
    00056
    00057     /// \brief
    00058     /// Default destructor for FdoInt64Value.
    00059     virtual ~FdoInt64Value();
    00060
    00061     virtual void Dispose();
    00062 /// \endcond
    00063
    00064 public:
    00065
    00066     /// \brief
    00067     /// Constructs a default instance of an FdoInt64Value with a value of null.
    00068     ///
    00069     /// \return
    00070     /// Returns the created FdoInt64Value
    00071     ///
    00072     FDO_API static FdoInt64Value* Create();
    00073
    00074     /// \brief
    00075     /// Constructs a default instance of an FdoInt64Value using the specified arguments.
    00076     ///
    00077     /// \param value
    00078     /// Input a 64 bit integer
    00079     ///
    00080     /// \return
    00081     /// Returns the created FdoInt64Value
    00082     ///
    00083     FDO_API static FdoInt64Value* Create(FdoInt64 value);
    00084
    00085     /// \brief
    00086     /// Gets the data type of the FdoInt64Value.
    00087     ///
    00088     /// \return
    00089     /// Returns an FdoDataType
    00090     ///
    00091     FDO_API FdoDataType GetDataType();
    00092
    00093     /// \brief
    00094     /// Gets the FdoInt64Value.
    00095     ///
    00096     /// \return
    00097     /// Returns a 64 bit integer
    00098     ///
    00099     FDO_API FdoInt64 GetInt64();
    00100
    00101     /// \brief
    00102     /// Sets the FdoInt64Value.
    00103     ///
    00104     /// \param value
    00105     /// Input a 64 bit integer
    00106     ///
    00107     /// \return
    00108     /// Returns nothing
    00109     ///
    00110     FDO_API void SetInt64(FdoInt64 value);
    00111
    00112     /// \brief
    00113     /// Overrides FdoExpression.Process to pass the FdoInt64Value to the appropriate
    00114     /// expression processor operation.
    00115     ///
    00116     /// \param p
    00117     /// Input an FdoIExpressionProcessor
    00118     ///
    00119     /// \return
    00120     /// Returns nothing
    00121     ///
    00122     FDO_API void Process(FdoIExpressionProcessor* p);
    00123
    00124     /// \brief
    00125     /// Returns the well defined text representation of this expression.
    00126     ///
    00127     /// \return
    00128     /// Returns a character string
    00129     ///
    00130     FDO_API FdoString* ToString();
    00131
    00132     /// \brief
    00133     /// A cast operator to get the integer value.
    00134     ///
    00135     /// \return
    00136     /// Returns a 64 bit integer
    00137     ///
    00138     FDO_API operator FdoInt64()
    00139     {
    00140         return m_data;
    00141     }
    00142
    00143 /// \cond DOXYGEN-IGNORE
    00144 protected:
    00145     /// \brief
    00146     /// Constructs an instance of an FdoInt64Value from another FdoDataValue.
    00147     ///
    00148     /// \param src
    00149     /// Input the other FdoDataValue. Must be of one of the following types:
    00150     ///     FdoDataType_Byte
    00151     ///     FdoDataType_Int16
    00152     ///     FdoDataType_Int32
    00153     ///     FdoDataType_Int64
    00154     /// \param truncate
    00155     /// Input in the future, will determine what to do if source value does not fit in the int64
    00156     /// number range:
    00157     ///     true - truncate the value to fit.
    00158     ///     false - throw an exception
    00159     /// \param nullIfIncompatible
    00160     /// Input in the future, will determine what to do if source value type is not compatible with the
    00161     /// FDO int64 type:
    00162     ///     true - return NULL.
    00163     ///     false - throw an exception
    00164     ///
    00165     /// \return
    00166     /// Returns an FdoInt64Value
    00167     ///
    00168     static FdoInt64Value* Create(
    00169         FdoDataValue* src,
    00170         FdoBoolean truncate = false,
    00171         FdoBoolean nullIfIncompatible = false
    00172     );
    00173
    00174     // See FdoDataValue::DoCompare()
    00175     virtual FdoCompareType DoCompare( FdoDataValue* other );
    00176
    00177     FdoInt64    m_data;
    00178 /// \endcond
    00179 };
    00180 #endif
    00181
    00182

Please send us your comment about this page