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

# ByteValue.h

Go to the documentation of this file.

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

Please send us your comment about this page