Kaydet (Commit) 344cadbb authored tarafından Ocke Janssen's avatar Ocke Janssen

#99549# insert and remove some delete and new operators

üst 77a70f87
......@@ -2,9 +2,9 @@
*
* $RCSfile: CommonTools.hxx,v $
*
* $Revision: 1.14 $
* $Revision: 1.15 $
*
* last change: $Author: hr $ $Date: 2001-09-27 13:58:19 $
* last change: $Author: oj $ $Date: 2002-07-05 06:58:31 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
......@@ -126,20 +126,35 @@ namespace connectivity
template< class VectorVal > class ORefVector : public ::std::vector< VectorVal >
{
oslInterlockedCount m_refCount;
// ORefVector(const ORefVector&);
// ORefVector& operator=(const ORefVector&);
typedef ::std::vector< VectorVal > BaseClass;
protected:
virtual ~ORefVector(){}
public:
ORefVector() : m_refCount(0) {}
ORefVector(size_t _st) : ::std::vector< VectorVal > (_st) , m_refCount(0) {}
ORefVector(const ORefVector& _rRH) : ::std::vector< VectorVal > (_rRH),m_refCount(0)
{
}
ORefVector& operator=(const ORefVector& _rRH)
{
if ( &_rRH != this )
{
BaseClass::operator=(_rRH);
}
return *this;
}
inline static void * SAL_CALL operator new( size_t nSize ) SAL_THROW( () )
{ return ::rtl_allocateMemory( nSize ); }
inline static void * SAL_CALL operator new( size_t nSize,const void* _pHint ) SAL_THROW( () )
{ return _pHint; }
inline static void SAL_CALL operator delete( void * pMem ) SAL_THROW( () )
{ ::rtl_freeMemory( pMem ); }
inline static void SAL_CALL operator delete( void * pMem,const void* _pHint ) SAL_THROW( () )
{ }
inline static void * SAL_CALL operator new( size_t, void * pMem ) SAL_THROW( () )
{ return pMem; }
inline static void SAL_CALL operator delete( void *, void * ) SAL_THROW( () )
{}
void acquire()
{
......
......@@ -2,9 +2,9 @@
*
* $RCSfile: FValue.hxx,v $
*
* $Revision: 1.4 $
* $Revision: 1.5 $
*
* last change: $Author: oj $ $Date: 2001-09-20 12:51:56 $
* last change: $Author: oj $ $Date: 2002-07-05 06:58:32 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
......@@ -246,6 +246,15 @@ namespace connectivity
free();
}
inline static void * SAL_CALL operator new( size_t nSize ) SAL_THROW( () )
{ return ::rtl_allocateMemory( nSize ); }
inline static void * SAL_CALL operator new( size_t nSize,void* _pHint ) SAL_THROW( () )
{ return _pHint; }
inline static void SAL_CALL operator delete( void * pMem ) SAL_THROW( () )
{ ::rtl_freeMemory( pMem ); }
inline static void SAL_CALL operator delete( void * pMem,void* _pHint ) SAL_THROW( () )
{ }
ORowSetValue& operator=(const ORowSetValue& _rRH);
// simple types
......
......@@ -2,9 +2,9 @@
*
* $RCSfile: PColumn.hxx,v $
*
* $Revision: 1.8 $
* $Revision: 1.9 $
*
* last change: $Author: oj $ $Date: 2002-07-04 06:30:08 $
* last change: $Author: oj $ $Date: 2002-07-05 06:58:32 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
......@@ -99,15 +99,6 @@ namespace connectivity
sal_Bool _IsCurrency,
sal_Bool _bCase);
inline static void * SAL_CALL operator new( size_t nSize ) SAL_THROW( () )
{ return ::rtl_allocateMemory( nSize ); }
inline static void * SAL_CALL operator new( size_t nSize,const void* _pHint ) SAL_THROW( () )
{ return const_cast<void*>(_pHint); }
inline static void SAL_CALL operator delete( void * pMem ) SAL_THROW( () )
{ ::rtl_freeMemory( pMem ); }
inline static void SAL_CALL operator delete( void * pMem,const void* _pHint ) SAL_THROW( () )
{ }
virtual void construct();
void setRealName(const ::rtl::OUString& _rName) { m_aRealName = _rName; }
......
......@@ -2,9 +2,9 @@
*
* $RCSfile: VCollection.hxx,v $
*
* $Revision: 1.16 $
* $Revision: 1.17 $
*
* last change: $Author: oj $ $Date: 2002-07-04 06:30:09 $
* last change: $Author: oj $ $Date: 2002-07-05 06:58:34 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
......@@ -204,17 +204,8 @@ namespace connectivity
public:
virtual ~OCollection();
DECLARE_SERVICE_INFO();
inline static void * SAL_CALL operator new( size_t nSize ) SAL_THROW( () )
{ return ::rtl_allocateMemory( nSize ); }
inline static void * SAL_CALL operator new( size_t nSize,const void* _pHint ) SAL_THROW( () )
{ return const_cast<void*>(_pHint); }
inline static void SAL_CALL operator delete( void * pMem ) SAL_THROW( () )
{ ::rtl_freeMemory( pMem ); }
inline static void SAL_CALL operator delete( void * pMem,const void* _pHint ) SAL_THROW( () )
{ }
void reFill(const TStringVector &_rVector);
sal_Bool isCaseSensitive() const { return m_aNameMap.key_comp().isCaseSensitive(); }
......
......@@ -2,9 +2,9 @@
*
* $RCSfile: VColumn.hxx,v $
*
* $Revision: 1.10 $
* $Revision: 1.11 $
*
* last change: $Author: oj $ $Date: 2002-07-04 06:30:10 $
* last change: $Author: oj $ $Date: 2002-07-05 06:58:34 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
......@@ -146,17 +146,6 @@ namespace connectivity
sal_Bool _IsCurrency,
sal_Bool _bCase);
inline static void * SAL_CALL operator new( size_t nSize ) SAL_THROW( () )
{ return ::rtl_allocateMemory( nSize ); }
inline static void * SAL_CALL operator new( size_t nSize,const void* _pHint ) SAL_THROW( () )
{ return const_cast<void*>(_pHint); }
inline static void SAL_CALL operator delete( void * pMem ) SAL_THROW( () )
{ ::rtl_freeMemory( pMem ); }
inline static void SAL_CALL operator delete( void * pMem,const void* _pHint ) SAL_THROW( () )
{ }
DECLARE_SERVICE_INFO();
//XInterface
virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException);
......
......@@ -2,9 +2,9 @@
*
* $RCSfile: sqliterator.hxx,v $
*
* $Revision: 1.8 $
* $Revision: 1.9 $
*
* last change: $Author: oj $ $Date: 2001-03-01 10:57:55 $
* last change: $Author: oj $ $Date: 2002-07-05 06:58:32 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
......@@ -192,6 +192,15 @@ namespace connectivity
const OSQLParser* _pParser = NULL);
~OSQLParseTreeIterator();
inline static void * SAL_CALL operator new( size_t nSize ) SAL_THROW( () )
{ return ::rtl_allocateMemory( nSize ); }
inline static void * SAL_CALL operator new( size_t nSize,void* _pHint ) SAL_THROW( () )
{ return _pHint; }
inline static void SAL_CALL operator delete( void * pMem ) SAL_THROW( () )
{ ::rtl_freeMemory( pMem ); }
inline static void SAL_CALL operator delete( void * pMem,void* _pHint ) SAL_THROW( () )
{ }
void dispose();
sal_Bool isCaseSensitive() const { return m_aCaseEqual.isCaseSensitive(); }
// Der zu analysierende/zu traversierende Parse Tree:
......@@ -320,7 +329,7 @@ namespace connectivity
void traverseAll();
// Die TableRangeMap enth"alt alle Tabellen unter dem zugeh"origen Rangenamen der zuerst gefunden wird
const OSQLTables& getTables() const { return m_aTables;};
const OSQLTables& getTables() const { return m_aTables;}
::vos::ORef<OSQLColumns> getSelectColumns() const { return m_aSelectColumns;}
::vos::ORef<OSQLColumns> getParameters() const { return m_aParameters; }
......
......@@ -2,9 +2,9 @@
*
* $RCSfile: sqlnode.hxx,v $
*
* $Revision: 1.8 $
* $Revision: 1.9 $
*
* last change: $Author: oj $ $Date: 2001-10-29 10:23:34 $
* last change: $Author: oj $ $Date: 2002-07-05 06:58:32 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
......@@ -264,6 +264,15 @@ namespace connectivity
// Destruktor raeumt rekursiv den Baum ab
virtual ~OSQLParseNode();
inline static void * SAL_CALL operator new( size_t nSize ) SAL_THROW( () )
{ return ::rtl_allocateMemory( nSize ); }
inline static void * SAL_CALL operator new( size_t nSize,void* _pHint ) SAL_THROW( () )
{ return _pHint; }
inline static void SAL_CALL operator delete( void * pMem ) SAL_THROW( () )
{ ::rtl_freeMemory( pMem ); }
inline static void SAL_CALL operator delete( void * pMem,void* _pHint ) SAL_THROW( () )
{ }
// Parent gibt den Zeiger auf den Parent zurueck
OSQLParseNode* getParent() const {return m_pParent;};
......@@ -400,7 +409,9 @@ namespace connectivity
inline OSQLParseNode* OSQLParseNode::getChild(sal_uInt32 nPos) const
{
OSL_ENSURE(nPos < m_aChilds.size(), "Invalid Position");
return m_aChilds[nPos];
// return m_aChilds[nPos];
return m_aChilds.at(nPos);
}
// Utility-Methoden zum Abfragen auf bestimmte Rules, Token oder Punctuation:
......
......@@ -2,9 +2,9 @@
*
* $RCSfile: FDatabaseMetaDataResultSetMetaData.hxx,v $
*
* $Revision: 1.3 $
* $Revision: 1.4 $
*
* last change: $Author: oj $ $Date: 2001-07-12 14:14:03 $
* last change: $Author: oj $ $Date: 2002-07-05 07:03:01 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
......@@ -96,15 +96,13 @@ namespace connectivity
sal_Int32 m_nColCount;
protected:
~ODatabaseMetaDataResultSetMetaData();
virtual ~ODatabaseMetaDataResultSetMetaData();
public:
// ein Konstruktor, der fuer das Returnen des Objektes benoetigt wird:
ODatabaseMetaDataResultSetMetaData( )
: m_nColCount(0)
{
}
/// Avoid ambigous cast error from the compiler.
inline operator ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSetMetaData > () throw()
{ return this; }
......
......@@ -2,9 +2,9 @@
*
* $RCSfile: OColumn.hxx,v $
*
* $Revision: 1.1.1.1 $
* $Revision: 1.2 $
*
* last change: $Author: hr $ $Date: 2000-09-18 16:14:24 $
* last change: $Author: oj $ $Date: 2002-07-05 07:03:01 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
......@@ -144,6 +144,15 @@ namespace connectivity
m_ColumnLabel = _aColumnName;
}
inline static void * SAL_CALL operator new( size_t nSize ) SAL_THROW( () )
{ return ::rtl_allocateMemory( nSize ); }
inline static void * SAL_CALL operator new( size_t nSize,void* _pHint ) SAL_THROW( () )
{ return _pHint; }
inline static void SAL_CALL operator delete( void * pMem ) SAL_THROW( () )
{ ::rtl_freeMemory( pMem ); }
inline static void SAL_CALL operator delete( void * pMem,void* _pHint ) SAL_THROW( () )
{ }
sal_Bool isAutoIncrement() const { return m_AutoIncrement; }
sal_Bool isCaseSensitive() const { return m_CaseSensitive; }
sal_Bool isSearchable() const { return m_Searchable; }
......
......@@ -2,9 +2,9 @@
*
* $RCSfile: OSubComponent.hxx,v $
*
* $Revision: 1.7 $
* $Revision: 1.8 $
*
* last change: $Author: oj $ $Date: 2001-05-14 11:54:42 $
* last change: $Author: oj $ $Date: 2002-07-05 07:03:01 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
......@@ -106,7 +106,6 @@ namespace connectivity
{
}
protected:
void dispose_ChildImpl()
{
......
......@@ -2,9 +2,9 @@
*
* $RCSfile: OTypeInfo.hxx,v $
*
* $Revision: 1.2 $
* $Revision: 1.3 $
*
* last change: $Author: oj $ $Date: 2001-04-12 12:34:29 $
* last change: $Author: oj $ $Date: 2002-07-05 07:03:01 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
......@@ -108,6 +108,16 @@ namespace connectivity
,nPrecision(0)
,nSearchType( ::com::sun::star::sdbc::ColumnSearch::FULL)
{}
inline static void * SAL_CALL operator new( size_t nSize ) SAL_THROW( () )
{ return ::rtl_allocateMemory( nSize ); }
inline static void * SAL_CALL operator new( size_t nSize,void* _pHint ) SAL_THROW( () )
{ return _pHint; }
inline static void SAL_CALL operator delete( void * pMem ) SAL_THROW( () )
{ ::rtl_freeMemory( pMem ); }
inline static void SAL_CALL operator delete( void * pMem,void* _pHint ) SAL_THROW( () )
{ }
sal_Bool operator == (const OTypeInfo& lh) const { return lh.nType == nType; }
sal_Bool operator != (const OTypeInfo& lh) const { return lh.nType != nType; }
};
......
......@@ -2,9 +2,9 @@
*
* $RCSfile: TDatabaseMetaDataBase.hxx,v $
*
* $Revision: 1.1 $
* $Revision: 1.2 $
*
* last change: $Author: oj $ $Date: 2000-11-03 14:03:17 $
* last change: $Author: oj $ $Date: 2002-07-05 07:03:01 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
......@@ -84,10 +84,12 @@ namespace connectivity
protected:
::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection > m_xConnection;
::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener> m_xListenerHelper; // forward the calls from the connection to me
virtual ~ODatabaseMetaDataBase();
public:
ODatabaseMetaDataBase(const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >& _rxConnection);
virtual ~ODatabaseMetaDataBase();
// XEventListener
virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw(::com::sun::star::uno::RuntimeException);
};
......
......@@ -2,9 +2,9 @@
*
* $RCS: $
*
* $Revision: 1.3 $
* $Revision: 1.4 $
*
* last change: $Author: oj $ $Date: 2002-07-04 06:36:40 $
* last change: $Author: oj $ $Date: 2002-07-05 07:03:02 $
*
* The Contents of this are made available subject to the terms of
* either of the following licenses
......@@ -80,6 +80,15 @@ namespace connectivity
~OKeyValue();
inline static void * SAL_CALL operator new( size_t nSize ) SAL_THROW( () )
{ return ::rtl_allocateMemory( nSize ); }
inline static void * SAL_CALL operator new( size_t nSize,void* _pHint ) SAL_THROW( () )
{ return _pHint; }
inline static void SAL_CALL operator delete( void * pMem ) SAL_THROW( () )
{ ::rtl_freeMemory( pMem ); }
inline static void SAL_CALL operator delete( void * pMem,void* _pHint ) SAL_THROW( () )
{ }
static OKeyValue* createKeyValue(sal_Int32 nVal);
// static OKeyValue* createEmptyKeyValue();
......
......@@ -2,9 +2,9 @@
*
* $RCSfile: TSkipDeletedSet.hxx,v $
*
* $Revision: 1.2 $
* $Revision: 1.3 $
*
* last change: $Author: oj $ $Date: 2001-11-29 16:33:10 $
* last change: $Author: oj $ $Date: 2002-07-05 07:03:02 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
......@@ -65,6 +65,9 @@
#include "TResultSetHelper.hxx"
#endif
#ifndef _RTL_ALLOC_H_
#include <rtl/alloc.h>
#endif
#include <map>
#include <vector>
......@@ -84,6 +87,15 @@ namespace connectivity
public:
OSkipDeletedSet(IResultSetHelper* _pHelper);
inline static void * SAL_CALL operator new( size_t nSize ) SAL_THROW( () )
{ return ::rtl_allocateMemory( nSize ); }
inline static void * SAL_CALL operator new( size_t nSize,void* _pHint ) SAL_THROW( () )
{ return _pHint; }
inline static void SAL_CALL operator delete( void * pMem ) SAL_THROW( () )
{ ::rtl_freeMemory( pMem ); }
inline static void SAL_CALL operator delete( void * pMem,void* _pHint ) SAL_THROW( () )
{ }
/**
skipDeleted moves the resultset to the position defined by the parameters
it garantees that the row isn't deleted
......
......@@ -2,9 +2,9 @@
*
* $RCSfile: TSortIndex.hxx,v $
*
* $Revision: 1.3 $
* $Revision: 1.4 $
*
* last change: $Author: oj $ $Date: 2001-11-09 06:59:01 $
* last change: $Author: oj $ $Date: 2002-07-05 07:03:02 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
......@@ -106,6 +106,15 @@ namespace connectivity
~OSortIndex();
inline static void * SAL_CALL operator new( size_t nSize ) SAL_THROW( () )
{ return ::rtl_allocateMemory( nSize ); }
inline static void * SAL_CALL operator new( size_t nSize,void* _pHint ) SAL_THROW( () )
{ return _pHint; }
inline static void SAL_CALL operator delete( void * pMem ) SAL_THROW( () )
{ ::rtl_freeMemory( pMem ); }
inline static void SAL_CALL operator delete( void * pMem,void* _pHint ) SAL_THROW( () )
{ }
/**
AddKeyValue appends a new value.
......
......@@ -2,9 +2,9 @@
*
* $RCSfile: sqlscan.hxx,v $
*
* $Revision: 1.4 $
* $Revision: 1.5 $
*
* last change: $Author: oj $ $Date: 2001-05-30 13:37:52 $
* last change: $Author: oj $ $Date: 2002-07-05 07:03:03 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
......@@ -83,7 +83,16 @@ namespace connectivity
public:
OSQLScanner();
~OSQLScanner();
virtual ~OSQLScanner();
inline static void * SAL_CALL operator new( size_t nSize ) SAL_THROW( () )
{ return ::rtl_allocateMemory( nSize ); }
inline static void * SAL_CALL operator new( size_t nSize,void* _pHint ) SAL_THROW( () )
{ return _pHint; }
inline static void SAL_CALL operator delete( void * pMem ) SAL_THROW( () )
{ ::rtl_freeMemory( pMem ); }
inline static void SAL_CALL operator delete( void * pMem,void* _pHint ) SAL_THROW( () )
{ }
virtual sal_Int32 SQLyygetc(void);
virtual void SQLyyerror(char *fmt);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment