Main Page   Class Hierarchy   Compound List   File List   Compound Members   Related Pages  

FunctionWrapper.h

00001 /*****************************************************************************
00002  * Author:   Valient Gough <vgough@pobox.com>
00003  *
00004  *****************************************************************************
00005  * Copyright (c) 2001, Valient Gough
00006  *
00007  * This library is free software; you can distribute it and/or modify it under
00008  * the terms of the GNU Lesser General Public License (LGPL), as published by
00009  * the Free Software Foundation; either version 2.1 of the License, or (at your
00010  * option) any later version.
00011  *
00012  * This library is distributed in the hope that it will be useful, but WITHOUT
00013  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00014  * FITNESS FOR A PARTICULAR PURPOSE.  See the LGPL in the file COPYING for more
00015  * details.
00016  *
00017  */
00018 
00019 #ifndef _FunctionWrapper_incl_
00020 #define _FunctionWrapper_incl_
00021 
00022 #include <rel/SmartPtr.h>
00023 
00024 namespace rel
00025 {
00026     class TypeStream;
00027     typedef OpaqueValue (*TypeStreamArgFunction)(const TypeStream *);
00028     struct TypeStreamArgFunctionWrapper { };
00029     OpaqueValue functionWrapper( TypeStreamArgFunction function );
00030     
00031     typedef OpaqueValue (*NullArgFunction)();
00032     struct NullArgFunctionWrapper { };
00033     OpaqueValue functionWrapper( NullArgFunction function );
00034 
00035 
00036 
00037     template<>
00038         bool smartPtrInterpret<TypeStreamArgFunctionWrapper>(
00039                 TypeStreamArgFunctionWrapper *value,
00040                 const std::type_info &resultType,
00041                 const OpaqueValue *args,
00042                 OpaqueValue *output);
00043 
00044     template<>
00045         bool smartPtrInterpret<NullArgFunctionWrapper>(
00046                 NullArgFunctionWrapper *value,
00047                 const std::type_info &resultType,
00048                 const OpaqueValue *args,
00049                 OpaqueValue *output);
00050 
00051 
00052 
00053 } // namespace rel
00054 
00055 
00056 
00057 #endif

Generated at Sat Sep 22 02:20:00 2001 for librel by doxygen1.2.10 written by Dimitri van Heesch, © 1997-2001