1234bd5c5SAndrew Rist /************************************************************** 2cdf0e10cSrcweir * 3234bd5c5SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 4234bd5c5SAndrew Rist * or more contributor license agreements. See the NOTICE file 5234bd5c5SAndrew Rist * distributed with this work for additional information 6234bd5c5SAndrew Rist * regarding copyright ownership. The ASF licenses this file 7234bd5c5SAndrew Rist * to you under the Apache License, Version 2.0 (the 8234bd5c5SAndrew Rist * "License"); you may not use this file except in compliance 9234bd5c5SAndrew Rist * with the License. You may obtain a copy of the License at 10234bd5c5SAndrew Rist * 11234bd5c5SAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12234bd5c5SAndrew Rist * 13234bd5c5SAndrew Rist * Unless required by applicable law or agreed to in writing, 14234bd5c5SAndrew Rist * software distributed under the License is distributed on an 15234bd5c5SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16234bd5c5SAndrew Rist * KIND, either express or implied. See the License for the 17234bd5c5SAndrew Rist * specific language governing permissions and limitations 18234bd5c5SAndrew Rist * under the License. 19234bd5c5SAndrew Rist * 20234bd5c5SAndrew Rist *************************************************************/ 21234bd5c5SAndrew Rist 22234bd5c5SAndrew Rist 23cdf0e10cSrcweir 24cdf0e10cSrcweir #ifndef __SBX_SBXMETHOD_HXX 25cdf0e10cSrcweir #define __SBX_SBXMETHOD_HXX 26cdf0e10cSrcweir 27cdf0e10cSrcweir #include <basic/sbxvar.hxx> 28*7fef15a0SDamjan Jovanovic #include "basic/basicdllapi.h" 29cdf0e10cSrcweir 30cdf0e10cSrcweir class SbxMethodImpl; 31cdf0e10cSrcweir 32*7fef15a0SDamjan Jovanovic class BASIC_DLLPUBLIC SbxMethod : public SbxVariable 33cdf0e10cSrcweir { 34cdf0e10cSrcweir SbxMethodImpl* mpSbxMethodImpl; // Impl data 3522a7caf0STsutomu Uchino bool mbIsRuntimeFunction; 3622a7caf0STsutomu Uchino SbxDataType mbRuntimeFunctionReturnType; 37cdf0e10cSrcweir 38cdf0e10cSrcweir public: 39cdf0e10cSrcweir SBX_DECL_PERSIST_NODATA(SBXCR_SBX,SBXID_METHOD,1); 40cdf0e10cSrcweir TYPEINFO(); SbxMethod(const String & r,SbxDataType t,bool bIsRuntimeFunction=false)4122a7caf0STsutomu Uchino SbxMethod( const String& r, SbxDataType t, bool bIsRuntimeFunction=false ) 4222a7caf0STsutomu Uchino : SbxVariable( t ), mbIsRuntimeFunction( bIsRuntimeFunction ), mbRuntimeFunctionReturnType( t ) { SetName( r ); } SbxMethod(const SbxMethod & r)4322a7caf0STsutomu Uchino SbxMethod( const SbxMethod& r ) 4422a7caf0STsutomu Uchino : SvRefBase( r ), SbxVariable( r ), mbIsRuntimeFunction( r.IsRuntimeFunction() ) {} operator =(const SbxMethod & r)45cdf0e10cSrcweir SbxMethod& operator=( const SbxMethod& r ) 46cdf0e10cSrcweir { SbxVariable::operator=( r ); return *this; } 47cdf0e10cSrcweir sal_Bool Run( SbxValues* pValues = NULL ); 48cdf0e10cSrcweir virtual SbxClassType GetClass() const; IsRuntimeFunction() const4922a7caf0STsutomu Uchino bool IsRuntimeFunction() const { return mbIsRuntimeFunction; } GetRuntimeFunctionReturnType() const5022a7caf0STsutomu Uchino SbxDataType GetRuntimeFunctionReturnType() const{ return mbRuntimeFunctionReturnType; } 51cdf0e10cSrcweir }; 52cdf0e10cSrcweir 53cdf0e10cSrcweir #ifndef __SBX_SBXMETHODREF_HXX 54cdf0e10cSrcweir #define __SBX_SBXMETHODREF_HXX 55cdf0e10cSrcweir 56cdf0e10cSrcweir #ifndef SBX_METHOD_DECL_DEFINED 57cdf0e10cSrcweir #define SBX_METHOD_DECL_DEFINED 58cdf0e10cSrcweir SV_DECL_REF(SbxMethod) 59cdf0e10cSrcweir #endif 60cdf0e10cSrcweir SV_IMPL_REF(SbxMethod) 61cdf0e10cSrcweir 62cdf0e10cSrcweir #endif 63cdf0e10cSrcweir #endif 64cdf0e10cSrcweir 65