diff options
Diffstat (limited to 'salhelper/test')
-rw-r--r-- | salhelper/test/dynamicloader/makefile.mk | 14 | ||||
-rw-r--r-- | salhelper/test/rtti/exports.dxp | 8 | ||||
-rw-r--r-- | salhelper/test/rtti/makefile.mk | 141 | ||||
-rw-r--r-- | salhelper/test/rtti/rttitest.cxx | 28 | ||||
-rw-r--r-- | salhelper/test/rtti/samplelibrtti.cxx | 35 | ||||
-rw-r--r-- | salhelper/test/rtti/samplelibrtti.hxx | 28 | ||||
-rw-r--r-- | salhelper/test/rtti/sols.map | 28 |
7 files changed, 270 insertions, 12 deletions
diff --git a/salhelper/test/dynamicloader/makefile.mk b/salhelper/test/dynamicloader/makefile.mk index da5a5c731576..ca564df59fd7 100644 --- a/salhelper/test/dynamicloader/makefile.mk +++ b/salhelper/test/dynamicloader/makefile.mk @@ -2,9 +2,9 @@ # # $RCSfile: makefile.mk,v $ # -# $Revision: 1.1 $ +# $Revision: 1.2 $ # -# last change: $Author: jl $ $Date: 2001-04-19 15:26:23 $ +# last change: $Author: jl $ $Date: 2001-04-23 09:11:08 $ # # The Contents of this file are made available subject to the terms of # either of the following licenses @@ -78,16 +78,6 @@ BOOTSTRAP_SERVICE=FALSE # --- Files --- -UNOUCRDEP= $(SOLARBINDIR)$/applicat.rdb -UNOUCRRDB= $(SOLARBINDIR)$/applicat.rdb - -.IF "$(BOOTSTRAP_SERVICE)" == "TRUE" -UNOUCROUT= $(OUT)$/inc$/comprehensive -INCPRE+= $(OUT)$/inc$/comprehensive -CPPUMAKERFLAGS += -C -.ELSE -UNOUCROUT= $(OUT)$/inc -.ENDIF #RTTI on .IF "$(OS)" == "WNT" diff --git a/salhelper/test/rtti/exports.dxp b/salhelper/test/rtti/exports.dxp new file mode 100644 index 000000000000..41a9804fdbeb --- /dev/null +++ b/salhelper/test/rtti/exports.dxp @@ -0,0 +1,8 @@ +?funcA@MyClassA@@UAEXXZ +?funcB@MyClassA@@UAEXXZ +?funcC@MyClassA@@MAEXXZ +?funcD@MyClassA@@EAEXXZ +?funcA@MyClassB@@UAEXXZ +?funcB@MyClassB@@UAEXXZ +?funcC@MyClassB@@MAEXXZ +?funcD@MyClassB@@EAEXXZ
\ No newline at end of file diff --git a/salhelper/test/rtti/makefile.mk b/salhelper/test/rtti/makefile.mk new file mode 100644 index 000000000000..8d3309dc8415 --- /dev/null +++ b/salhelper/test/rtti/makefile.mk @@ -0,0 +1,141 @@ +#************************************************************************* +# +# $RCSfile: makefile.mk,v $ +# +# $Revision: 1.1 $ +# +# last change: $Author: jl $ $Date: 2001-04-23 09:12:56 $ +# +# The Contents of this file are made available subject to the terms of +# either of the following licenses +# +# - GNU Lesser General Public License Version 2.1 +# - Sun Industry Standards Source License Version 1.1 +# +# Sun Microsystems Inc., October, 2000 +# +# GNU Lesser General Public License Version 2.1 +# ============================================= +# Copyright 2000 by Sun Microsystems, Inc. +# 901 San Antonio Road, Palo Alto, CA 94303, USA +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License version 2.1, as published by the Free Software Foundation. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, +# MA 02111-1307 USA +# +# +# Sun Industry Standards Source License Version 1.1 +# ================================================= +# The contents of this file are subject to the Sun Industry Standards +# Source License Version 1.1 (the "License"); You may not use this file +# except in compliance with the License. You may obtain a copy of the +# License at http://www.openoffice.org/license.html. +# +# Software provided under this License is provided on an "AS IS" basis, +# WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, +# WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, +# MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. +# See the License for the specific provisions governing your rights and +# obligations concerning the Software. +# +# The Initial Developer of the Original Code is: Sun Microsystems, Inc. +# +# Copyright: 2000 by Sun Microsystems, Inc. +# +# All Rights Reserved. +# +# Contributor(s): _______________________________________ +# +# +# +#************************************************************************* +PRJ=..$/.. + +PRJNAME= salhelper +TARGET= rtti +TARGET1=samplelibrtti +LIBTARGET=NO +TARGETTYPE=CUI + + +NO_BSYMBOLIC= TRUE +ENABLE_EXCEPTIONS=TRUE + +USE_DEFFILE= TRUE + +# --- Settings ----------------------------------------------------- + +.INCLUDE : settings.mk + +# --- Files -------------------------------------------------------- + +#RTTI on +.IF "$(OS)" == "WNT" +CFLAGS+= -GR +.ENDIF + +SLOFILES= \ + $(SLO)$/samplelibrtti.obj + +LIB1TARGET=$(SLB)$/$(TARGET1).lib +LIB1OBJFILES= \ + $(SLO)$/samplelibrtti.obj + +SHL1TARGET= $(TARGET1) + +SHL1STDLIBS= \ + $(CPPULIB) \ + $(CPPUHELPERLIB) \ + $(SALLIB) + + +SHL1DEPN= +SHL1IMPLIB= i$(TARGET1) +SHL1LIBS= $(SLB)$/$(TARGET1).lib +SHL1DEF= $(MISC)$/$(SHL1TARGET).def +DEF1EXPORTFILE= exports.dxp + +DEF1NAME= $(SHL1TARGET) + +.IF "$(OS)$(CPU)"=="SOLARISS" +SHL1VERSIONMAP= sols.map +.ELIF "$(OS)$(CPU)"=="LINUXI" +SHL1VERSIONMAP= lngi.map +.ENDIF + + +# ------------------------------------------------------------------ + +APP1NOSAL=TRUE + +APP1TARGET= $(TARGET) + +APP1OBJS= $(OBJ)$/rttitest.obj + +APP1STDLIBS= \ + $(SALLIB) \ + $(CPPUHELPERLIB) \ + $(CPPULIB) + +#LIBCIMT=msvcrtd.lib + +APP1LIBS= $(LB)$/isamplelibrtti.lib + +.IF "$(GUI)"=="WNT" +APP1STDLIBS += $(LIBCIMT) +.ENDIF + +APP1DEF= $(MISC)\$(APP1TARGET).def +# --- Targets ------------------------------------------------------ + +.INCLUDE : target.mk diff --git a/salhelper/test/rtti/rttitest.cxx b/salhelper/test/rtti/rttitest.cxx new file mode 100644 index 000000000000..6b485474c163 --- /dev/null +++ b/salhelper/test/rtti/rttitest.cxx @@ -0,0 +1,28 @@ +#include <rtl/ustring> +#include <stdio.h> +#include <typeinfo.h> +#include "samplelibrtti.hxx" + + +//using namespace salhelper; +using namespace rtl; + + + +int main( int argc, char *argv[ ], char *envp[ ] ) +{ + MyClassB b; + MyClassA* pA= &b; + // test the virtual function + pA->funcA(); + + const type_info& i1= typeid ( b); + const type_info& i2= typeid( pA); + + if( typeid( b) == typeid( pA)) + printf("\nsame types"); + + + MyClassB* pB= dynamic_cast<MyClassB* >( pA); + return 0; +} diff --git a/salhelper/test/rtti/samplelibrtti.cxx b/salhelper/test/rtti/samplelibrtti.cxx new file mode 100644 index 000000000000..2b2bf930a8d9 --- /dev/null +++ b/salhelper/test/rtti/samplelibrtti.cxx @@ -0,0 +1,35 @@ +#include "samplelibrtti.hxx" + +// MyClassA ============================================================= +void MyClassA::funcA() +{ +} + +void MyClassA::funcB() +{ +} + +void MyClassA::funcC() +{ +} + +void MyClassA::funcD() +{ +} + +// MyClassB =============================================================== +void MyClassB::funcA() +{ +} + +void MyClassB::funcB() +{ +} + +void MyClassB::funcC() +{ +} + +void MyClassB::funcD() +{ +}
\ No newline at end of file diff --git a/salhelper/test/rtti/samplelibrtti.hxx b/salhelper/test/rtti/samplelibrtti.hxx new file mode 100644 index 000000000000..4ce52234fc7a --- /dev/null +++ b/salhelper/test/rtti/samplelibrtti.hxx @@ -0,0 +1,28 @@ +#ifndef __SAMPLELIBRTTI_HXX_ +#define __SAMPLELIBRTTI_HXX_ + +class MyClassA +{ +public: + virtual void funcA(); + virtual void funcB(); +protected: + virtual void funcC(); +private: + virtual void funcD(); +}; + + +class MyClassB: public MyClassA +{ +public: + virtual void funcA(); + virtual void funcB(); +protected: + virtual void funcC(); +private: + virtual void funcD(); + +}; + +#endif
\ No newline at end of file diff --git a/salhelper/test/rtti/sols.map b/salhelper/test/rtti/sols.map new file mode 100644 index 000000000000..c61280515a2e --- /dev/null +++ b/salhelper/test/rtti/sols.map @@ -0,0 +1,28 @@ +SALHLP_1_0 { + global: +GetVersionInfo; +_fini; +_init; +__1cJsalhelperSORealDynamicLoaderLnewInstance6Fpp1rknDrtlIOUString_7_2_; +__1cJsalhelperSORealDynamicLoader2t5B6Mpp1rknDrtlIOUString_7pv8_v_; +__1cJsalhelperSORealDynamicLoader2t6Mpp1rknDrtlIOUString_7pv8_v_; +__1cJsalhelperSORealDynamicLoaderG__vtbl_; +__1cJsalhelperSORealDynamicLoader2T5B6M_v_; +__1cJsalhelperSORealDynamicLoader2T6M_v_; +__1cJsalhelperbR__RTTI__1CpknJsalhelperSORealDynamicLoader__; +__1cJsalhelperbQ__RTTI__1CpnJsalhelperSORealDynamicLoader__; +__1cJsalhelperbO__RTTI__1nJsalhelperSORealDynamicLoader__; +__1cJsalhelperSORealDynamicLoaderHacquire6M_L_; +__1cJsalhelperSORealDynamicLoaderHrelease6M_L_; +__1cJsalhelperSORealDynamicLoaderGgetApi6kM_pv_; + local: + *; +}; + + + + + + + + |