Autodesk FDO Provider for SQL Server API Reference

SQLServer Provider API

API Reference Autodesk FDO Provider for SQL Server

SqlServerOvTextInRowOption.h

Go to the documentation of this file.
00001 #ifndef SQLSERVEROVTEXTINROWOPTION_H
00002 #define SQLSERVEROVTEXTINROWOPTION_H
00003 /*
00004  * Copyright (C) 2004-2008  Autodesk, Inc.
00005  * 
00006  * This library is free software; you can redistribute it and/or
00007  * modify it under the terms of version 2.1 of the GNU Lesser
00008  * General Public License as published by the Free Software Foundation.
00009  * 
00010  * This library is distributed in the hope that it will be useful,
00011  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013  * Lesser General Public License for more details.
00014  * 
00015  * You should have received a copy of the GNU Lesser General Public
00016  * License along with this library; if not, write to the Free Software
00017  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
00018  *
00019  */
00020 
00021 #include <Rdbms/Override/SQLServerSpatial/SqlServerOv.h>
00022 
00023 /// \brief
00024 /// Enumerated type representing the possible text-in-row options for SQL Server overrides
00025 /// <param name="SqlServerOvTextInRowOption_InRow">
00026 /// Text, ntext and image data are stored within the row's 8K page.
00027 /// </param>
00028 /// <param name="SqlServerOvTextInRowOption_notInRow">
00029 /// Text, ntext and image data are not stored within the row's 8K page.
00030 /// </param>
00031 /// <param name="SqlServerOvTextInRowOption_Default">
00032 /// The text-in-row override is inherited from somewhere else.
00033 /// </param>
00034 enum SqlServerOvTextInRowOption
00035 {
00036     SqlServerOvTextInRowOption_InRow,
00037     SqlServerOvTextInRowOption_NotInRow,
00038     SqlServerOvTextInRowOption_Default,
00039 };
00040 
00041 /// \brief
00042 /// XML string constants corresponding to the enumerated type SqlServerOvTextInRowOption.
00043 namespace FdoSqlServerOverrides
00044 {
00045     static const FdoString* TextInRowOption_InRow       = L"InRow";
00046     static const FdoString* TextInRowOption_NotInRow    = L"NotInRow";
00047     static const FdoString* TextInRowOption_Default     = L"Default";
00048 }
00049 
00050 static SqlServerOvTextInRowOption TextInRow_StringToEnum(FdoString* textInRowString, FdoXmlSaxContext* pContext = NULL)
00051 {
00052     SqlServerOvTextInRowOption ret;
00053 
00054     if (0==wcscmp(textInRowString, FdoSqlServerOverrides::TextInRowOption_InRow))
00055         ret = SqlServerOvTextInRowOption_InRow;
00056     else if (0==wcscmp(textInRowString, FdoSqlServerOverrides::TextInRowOption_NotInRow))
00057         ret = SqlServerOvTextInRowOption_NotInRow;
00058     else if (0==wcscmp(textInRowString, FdoSqlServerOverrides::TextInRowOption_Default))
00059         ret = SqlServerOvTextInRowOption_Default;
00060     else
00061     {
00062         ret = SqlServerOvTextInRowOption_Default;
00063         if (pContext != NULL)
00064         {
00065             FdoPtr<FdoException> e = FdoException::Create(L"TODO");
00066             pContext->AddError(e);
00067         }
00068     }
00069 
00070     return ret;
00071 }
00072 
00073 static FdoString* TextInRow_EnumToString(SqlServerOvTextInRowOption textInRowEnum)
00074 {
00075     if (textInRowEnum == SqlServerOvTextInRowOption_InRow)
00076         return FdoSqlServerOverrides::TextInRowOption_InRow;
00077     else if (textInRowEnum == SqlServerOvTextInRowOption_NotInRow)
00078         return FdoSqlServerOverrides::TextInRowOption_NotInRow;
00079     else if (textInRowEnum == SqlServerOvTextInRowOption_Default)
00080         return FdoSqlServerOverrides::TextInRowOption_Default;
00081     else
00082         throw FdoException::Create(L"TODO");
00083 }
00084 
00085 
00086 #endif  // SQLSERVEROVTEXTINROWOPTION_H
00087 
00088 

Comments?