FDO API Reference Feature Data Objects

LOBValue.h

Go to the documentation of this file.
00001 #ifndef _LOBVALUE_H_
00002 #define _LOBVALUE_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 FdoLOBValue class derives from FdoDataValue and represents a literal
00032 /// BLOB value.
00033 class FdoLOBValue : public FdoDataValue
00034 {
00035 
00036 public:
00037 
00038     /// \brief
00039     /// Gets the data type of the FdoLOBValue.
00040     /// 
00041     /// \return
00042     /// Returns an FdoDataType
00043     /// 
00044     FDO_API virtual FdoDataType GetDataType() = 0;
00045 
00046     /// \brief
00047     /// Gets the LOB value.
00048     /// 
00049     /// \return
00050     /// Returns a byte array
00051     /// 
00052     FDO_API virtual FdoByteArray* GetData() = 0;
00053 
00054     /// \brief
00055     /// Sets the LOB value.
00056     /// 
00057     /// \param value 
00058     /// Input an array of bytes
00059     /// 
00060     /// \return
00061     /// Returns nothing
00062     /// 
00063     FDO_API virtual void SetData(FdoByteArray* value) = 0;
00064 
00065     /// \brief
00066     /// Sets the FdoLOBValue to a null value.
00067     /// 
00068     /// \return
00069     /// Returns nothing
00070     /// 
00071     FDO_API virtual void SetNull() = 0;
00072 
00073     /// \brief
00074     /// Overrides FdoExpression.Process to pass the FdoLOBValue to the appropriate
00075     /// expression processor operation.
00076     /// 
00077     /// \param p 
00078     /// Input the FdoIExpressionProcessor
00079     /// 
00080     /// \return
00081     /// Returns nothing
00082     /// 
00083     FDO_API virtual void Process(FdoIExpressionProcessor* p) = 0;
00084 
00085     /// \brief
00086     /// Returns the well defined text representation of this expression.
00087     /// 
00088     /// \return
00089     /// Returns a text string
00090     /// 
00091     FDO_API virtual FdoString* ToString() = 0;
00092 
00093     /// \brief
00094     /// A cast operator to get the BLOB value.
00095     /// 
00096     /// \return
00097     /// Returns a byte array
00098     /// 
00099     FDO_API operator FdoByteArray*()
00100     {
00101         return m_data;
00102     }
00103 
00104 protected:
00105     FdoByteArray*   m_data;
00106 };
00107 #endif
00108 
00109 

Comments or suggestions? Send us feedback.