LCOV - code coverage report
Current view: top level - connectivity/source/inc - OColumn.hxx (source / functions) Hit Total Coverage
Test: commit e02a6cb2c3e2b23b203b422e4e0680877f232636 Lines: 0 24 0.0 %
Date: 2014-04-14 Functions: 0 19 0.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
       2             : /*
       3             :  * This file is part of the LibreOffice project.
       4             :  *
       5             :  * This Source Code Form is subject to the terms of the Mozilla Public
       6             :  * License, v. 2.0. If a copy of the MPL was not distributed with this
       7             :  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
       8             :  *
       9             :  * This file incorporates work covered by the following license notice:
      10             :  *
      11             :  *   Licensed to the Apache Software Foundation (ASF) under one or more
      12             :  *   contributor license agreements. See the NOTICE file distributed
      13             :  *   with this work for additional information regarding copyright
      14             :  *   ownership. The ASF licenses this file to you under the Apache
      15             :  *   License, Version 2.0 (the "License"); you may not use this file
      16             :  *   except in compliance with the License. You may obtain a copy of
      17             :  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
      18             :  */
      19             : 
      20             : #ifndef _CONNECTIVITY_COLUMN_HXX_
      21             : #define _CONNECTIVITY_COLUMN_HXX_
      22             : 
      23             : #include <rtl/ustring.hxx>
      24             : #include <sal/types.h>
      25             : #include "connectivity/dbtoolsdllapi.hxx"
      26             : 
      27             : namespace connectivity
      28             : {
      29           0 :     class OOO_DLLPUBLIC_DBTOOLS OColumn
      30             :     {
      31             :         OUString m_CatalogName;
      32             :         OUString m_SchemaName;
      33             :         OUString m_TableName;
      34             :         OUString m_ColumnName;
      35             :         OUString m_ColumnLabel;
      36             :         OUString m_ColumnTypeName;
      37             :         OUString m_ColumnServiceName;
      38             : 
      39             :         sal_Int32       m_Nullable;
      40             :         sal_Int32       m_ColumnDisplaySize;
      41             :         sal_Int32       m_Precision;
      42             :         sal_Int32       m_Scale;
      43             :         sal_Int32       m_ColumnType;
      44             : 
      45             :         sal_Bool        m_AutoIncrement;
      46             :         sal_Bool        m_CaseSensitive;
      47             :         sal_Bool        m_Searchable;
      48             :         sal_Bool        m_Currency;
      49             :         sal_Bool        m_Signed;
      50             :         sal_Bool        m_ReadOnly;
      51             :         sal_Bool        m_Writable;
      52             :         sal_Bool        m_DefinitelyWritable;
      53             : 
      54             :     public:
      55           0 :         OColumn()
      56             :             : m_Nullable(0)
      57             :             , m_ColumnDisplaySize(0)
      58             :             , m_Precision(0)
      59             :             , m_Scale(0)
      60             :             , m_ColumnType(0)
      61             : 
      62             :             , m_AutoIncrement(sal_False)
      63             :             , m_CaseSensitive(sal_False)
      64             :             , m_Searchable(sal_True)
      65             :             , m_Currency(sal_False)
      66             :             , m_Signed(sal_False)
      67             :             , m_ReadOnly(sal_True)
      68             :             , m_Writable(sal_False)
      69           0 :             , m_DefinitelyWritable(sal_False)
      70           0 :             {}
      71             : 
      72           0 :         OColumn(const OUString &_aTableName,
      73             :                 const OUString &_aColumnName,
      74             : 
      75             :                 sal_Int32       _aNullable=0,
      76             :                 sal_Int32       _aColumnDisplaySize=0,
      77             :                 sal_Int32       _aPrecision=0,
      78             :                 sal_Int32       _aScale=0,
      79             :                 sal_Int32       _aColumnType=0,
      80             : 
      81             :                 sal_Bool        _aAutoIncrement=sal_False,
      82             :                 sal_Bool        _aCaseSensitive=sal_False,
      83             :                 sal_Bool        _aSearchable=sal_True,
      84             :                 sal_Bool        _aCurrency=sal_False,
      85             :                 sal_Bool        _aSigned=sal_False,
      86             :                 sal_Bool        _aReadOnly=sal_True,
      87             :                 sal_Bool        _aWritable=sal_False,
      88             :                 sal_Bool        _aDefinitelyWritable=sal_False,
      89             : 
      90             :                 const OUString &_aColumnLabel = OUString(),
      91             :                 const OUString &_aColumnTypeName = OUString(),
      92             :                 const OUString &_aColumnServiceName = OUString())
      93             :         :   m_TableName(_aTableName),
      94             :             m_ColumnName(_aColumnName),
      95             :             m_ColumnLabel(_aColumnLabel),
      96             :             m_ColumnTypeName(_aColumnTypeName),
      97             :             m_ColumnServiceName(_aColumnServiceName),
      98             : 
      99             :             m_Nullable(_aNullable),
     100             :             m_ColumnDisplaySize(_aColumnDisplaySize),
     101             :             m_Precision(_aPrecision),
     102             :             m_Scale(_aScale),
     103             :             m_ColumnType(_aColumnType),
     104             : 
     105             :             m_AutoIncrement(_aAutoIncrement),
     106             :             m_CaseSensitive(_aCaseSensitive),
     107             :             m_Searchable(_aSearchable),
     108             :             m_Currency(_aCurrency),
     109             :             m_Signed(_aSigned),
     110             :             m_ReadOnly(_aReadOnly),
     111             :             m_Writable(_aWritable),
     112           0 :             m_DefinitelyWritable(_aDefinitelyWritable)
     113             :         {
     114           0 :             if(m_ColumnLabel.isEmpty())
     115           0 :                 m_ColumnLabel = _aColumnName;
     116           0 :         }
     117             : 
     118             :         inline static void * SAL_CALL operator new( size_t nSize ) SAL_THROW(())
     119             :             { return ::rtl_allocateMemory( nSize ); }
     120             :         inline static void * SAL_CALL operator new( size_t ,void* _pHint ) SAL_THROW(())
     121             :             { return _pHint; }
     122             :         inline static void SAL_CALL operator delete( void * pMem ) SAL_THROW(())
     123             :             { ::rtl_freeMemory( pMem ); }
     124             :         inline static void SAL_CALL operator delete( void *,void* ) SAL_THROW(())
     125             :             {  }
     126             : 
     127           0 :         sal_Bool isAutoIncrement()              const { return m_AutoIncrement; }
     128           0 :         sal_Bool isCaseSensitive()              const { return m_CaseSensitive; }
     129           0 :         sal_Bool isSearchable()                 const { return m_Searchable; }
     130           0 :         sal_Bool isCurrency()                   const { return m_Currency; }
     131           0 :         sal_Bool isSigned()                     const { return m_Signed; }
     132             :         sal_Bool isReadOnly()                   const { return m_ReadOnly; }
     133             :         sal_Bool isWritable()                   const { return m_Writable; }
     134             :         sal_Bool isDefinitelyWritable()         const { return m_DefinitelyWritable; }
     135             : 
     136           0 :         sal_Int32 isNullable()                  const { return m_Nullable; }
     137           0 :         sal_Int32 getColumnDisplaySize()        const { return m_ColumnDisplaySize; }
     138           0 :         sal_Int32 getPrecision()                const { return m_Precision; }
     139           0 :         sal_Int32 getScale()                    const { return m_Scale; }
     140           0 :         sal_Int32 getColumnType()               const { return m_ColumnType; }
     141             : 
     142           0 :         const OUString& getColumnLabel()         const { return m_ColumnLabel; }
     143           0 :         const OUString& getColumnName()          const { return m_ColumnName; }
     144             :         const OUString& getSchemaName()          const { return m_SchemaName; }
     145           0 :         const OUString& getTableName()           const { return m_TableName; }
     146             :         const OUString& getCatalogName()         const { return m_CatalogName; }
     147           0 :         const OUString& getColumnTypeName()      const { return m_ColumnTypeName; }
     148           0 :         const OUString& getColumnServiceName()   const { return m_ColumnServiceName; }
     149             : 
     150             :     };
     151             : }
     152             : 
     153             : #endif //_CONNECTIVITY_COLUMN_HXX_
     154             : 
     155             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10