FDO API Reference Feature Data Objects

DateTimeValue.h

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

Comments or suggestions? Send us feedback.