FDO API Reference Feature Data Objects

BooleanValue.h

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

Comments or suggestions? Send us feedback.