API Reference OSGeo FDO Provider for ODBC

SqlServerOvTextInRowOption.h

Go to the documentation of this file.
00001 #ifndef SQLSERVEROVTEXTINROWOPTION_H
00002 #define SQLSERVEROVTEXTINROWOPTION_H
00003 
00004 //
00005 //
00006 // (C) Copyright 1990-2005 by Autodesk, Inc.
00007 //
00008 //
00009 //
00010 // By using this code, you are agreeing to the terms
00011 // and conditions of the License Agreement that appeared
00012 // and was accepted upon download or installation
00013 // (or in connection with the download or installation)
00014 // of the Autodesk software in which this code is included.
00015 // All permissions on use of this code are as set forth
00016 // in such License Agreement provided that the above copyright
00017 // notice appears in all authorized copies and that both that
00018 // copyright notice and the limited warranty and
00019 // restricted rights notice below appear in all supporting
00020 // documentation.
00021 //
00022 // AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
00023 // AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
00024 // MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE.  AUTODESK, INC.
00025 // DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
00026 // UNINTERRUPTED OR ERROR FREE.
00027 //
00028 // Use, duplication, or disclosure by the U.S. Government is subject to
00029 // restrictions set forth in FAR 52.227-19 (Commercial Computer
00030 // Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii)
00031 // (Rights in Technical Data and Computer Software), as applicable.
00032 //
00033 #include <Rdbms/Override/SqlServer/SqlServerOv.h>
00034 
00035 /// \brief
00036 /// Enumerated type representing the possible text-in-row options for SQL Server overrides
00037 /// <param name="SqlServerOvTextInRowOption_InRow">
00038 /// Text, ntext and image data are stored within the row's 8K page.
00039 /// </param>
00040 /// <param name="SqlServerOvTextInRowOption_notInRow">
00041 /// Text, ntext and image data are not stored within the row's 8K page.
00042 /// </param>
00043 /// <param name="SqlServerOvTextInRowOption_Default">
00044 /// The text-in-row override is inherited from somewhere else.
00045 /// </param>
00046 enum SqlServerOvTextInRowOption
00047 {
00048     SqlServerOvTextInRowOption_InRow,
00049     SqlServerOvTextInRowOption_NotInRow,
00050     SqlServerOvTextInRowOption_Default,
00051 };
00052 
00053 /// \brief
00054 /// XML string constants corresponding to the enumerated type SqlServerOvTextInRowOption.
00055 namespace FdoSqlServerOverrides
00056 {
00057     static const FdoString* TextInRowOption_InRow       = L"InRow";
00058     static const FdoString* TextInRowOption_NotInRow    = L"NotInRow";
00059     static const FdoString* TextInRowOption_Default     = L"Default";
00060 }
00061 
00062 static SqlServerOvTextInRowOption TextInRow_StringToEnum(FdoString* textInRowString, FdoXmlSaxContext* pContext = NULL)
00063 {
00064     SqlServerOvTextInRowOption ret;
00065 
00066     if (0==wcscmp(textInRowString, FdoSqlServerOverrides::TextInRowOption_InRow))
00067         ret = SqlServerOvTextInRowOption_InRow;
00068     else if (0==wcscmp(textInRowString, FdoSqlServerOverrides::TextInRowOption_NotInRow))
00069         ret = SqlServerOvTextInRowOption_NotInRow;
00070     else if (0==wcscmp(textInRowString, FdoSqlServerOverrides::TextInRowOption_Default))
00071         ret = SqlServerOvTextInRowOption_Default;
00072     else
00073     {
00074         ret = SqlServerOvTextInRowOption_Default;
00075         if (pContext != NULL)
00076         {
00077             FdoPtr<FdoException> e = FdoException::Create(L"TODO");
00078             pContext->AddError(e);
00079         }
00080     }
00081 
00082     return ret;
00083 }
00084 
00085 static FdoString* TextInRow_EnumToString(SqlServerOvTextInRowOption textInRowEnum)
00086 {
00087     if (textInRowEnum == SqlServerOvTextInRowOption_InRow)
00088         return FdoSqlServerOverrides::TextInRowOption_InRow;
00089     else if (textInRowEnum == SqlServerOvTextInRowOption_NotInRow)
00090         return FdoSqlServerOverrides::TextInRowOption_NotInRow;
00091     else if (textInRowEnum == SqlServerOvTextInRowOption_Default)
00092         return FdoSqlServerOverrides::TextInRowOption_Default;
00093     else
00094         throw FdoException::Create(L"TODO");
00095 }
00096 
00097 
00098 #endif  // SQLSERVEROVTEXTINROWOPTION_H
00099 
00100 

Comments?