update credits
[LibreOffice.git] / connectivity / source / inc / OColumn.hxx
blob479762da8e2473b134b1f71dc7e85bab48ce8f6e
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
20 #ifndef _CONNECTIVITY_COLUMN_HXX_
21 #define _CONNECTIVITY_COLUMN_HXX_
23 #include <rtl/ustring.hxx>
24 #include <sal/types.h>
25 #include "connectivity/dbtoolsdllapi.hxx"
27 namespace connectivity
29 class OOO_DLLPUBLIC_DBTOOLS OColumn
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;
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;
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;
54 public:
55 OColumn() {}
56 OColumn(const OUString &_aTableName,
57 const OUString &_aColumnName,
59 sal_Int32 _aNullable=0,
60 sal_Int32 _aColumnDisplaySize=0,
61 sal_Int32 _aPrecision=0,
62 sal_Int32 _aScale=0,
63 sal_Int32 _aColumnType=0,
65 sal_Bool _aAutoIncrement=sal_False,
66 sal_Bool _aCaseSensitive=sal_False,
67 sal_Bool _aSearchable=sal_True,
68 sal_Bool _aCurrency=sal_False,
69 sal_Bool _aSigned=sal_False,
70 sal_Bool _aReadOnly=sal_True,
71 sal_Bool _aWritable=sal_False,
72 sal_Bool _aDefinitelyWritable=sal_False,
74 const OUString &_aColumnLabel = OUString(),
75 const OUString &_aColumnTypeName = OUString(),
76 const OUString &_aColumnServiceName = OUString())
77 : m_TableName(_aTableName),
78 m_ColumnName(_aColumnName),
79 m_ColumnLabel(_aColumnLabel),
80 m_ColumnTypeName(_aColumnTypeName),
81 m_ColumnServiceName(_aColumnServiceName),
83 m_Nullable(_aNullable),
84 m_ColumnDisplaySize(_aColumnDisplaySize),
85 m_Precision(_aPrecision),
86 m_Scale(_aScale),
87 m_ColumnType(_aColumnType),
89 m_AutoIncrement(_aAutoIncrement),
90 m_CaseSensitive(_aCaseSensitive),
91 m_Searchable(_aSearchable),
92 m_Currency(_aCurrency),
93 m_Signed(_aSigned),
94 m_ReadOnly(_aReadOnly),
95 m_Writable(_aWritable),
96 m_DefinitelyWritable(_aDefinitelyWritable)
98 if(m_ColumnLabel.isEmpty())
99 m_ColumnLabel = _aColumnName;
102 inline static void * SAL_CALL operator new( size_t nSize ) SAL_THROW(())
103 { return ::rtl_allocateMemory( nSize ); }
104 inline static void * SAL_CALL operator new( size_t ,void* _pHint ) SAL_THROW(())
105 { return _pHint; }
106 inline static void SAL_CALL operator delete( void * pMem ) SAL_THROW(())
107 { ::rtl_freeMemory( pMem ); }
108 inline static void SAL_CALL operator delete( void *,void* ) SAL_THROW(())
111 sal_Bool isAutoIncrement() const { return m_AutoIncrement; }
112 sal_Bool isCaseSensitive() const { return m_CaseSensitive; }
113 sal_Bool isSearchable() const { return m_Searchable; }
114 sal_Bool isCurrency() const { return m_Currency; }
115 sal_Bool isSigned() const { return m_Signed; }
116 sal_Bool isReadOnly() const { return m_ReadOnly; }
117 sal_Bool isWritable() const { return m_Writable; }
118 sal_Bool isDefinitelyWritable() const { return m_DefinitelyWritable; }
120 sal_Int32 isNullable() const { return m_Nullable; }
121 sal_Int32 getColumnDisplaySize() const { return m_ColumnDisplaySize; }
122 sal_Int32 getPrecision() const { return m_Precision; }
123 sal_Int32 getScale() const { return m_Scale; }
124 sal_Int32 getColumnType() const { return m_ColumnType; }
126 const OUString& getColumnLabel() const { return m_ColumnLabel; }
127 const OUString& getColumnName() const { return m_ColumnName; }
128 const OUString& getSchemaName() const { return m_SchemaName; }
129 const OUString& getTableName() const { return m_TableName; }
130 const OUString& getCatalogName() const { return m_CatalogName; }
131 const OUString& getColumnTypeName() const { return m_ColumnTypeName; }
132 const OUString& getColumnServiceName() const { return m_ColumnServiceName; }
137 #endif //_CONNECTIVITY_COLUMN_HXX_
139 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */