OWLNext    7.0
Borland's Object Windows Library for the modern age
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
functor.cpp
Go to the documentation of this file.
1//-----------------------------------------------------------------------------
2// Visual Database Tools
3// Copyright (c) 1996 by Borland International, All Rights Reserved
4//
5/// \file
6/// C++ Functor template implementation
7///
8/// Based on Functors described in
9/// Rich Hickey's 'Callbacks in C++ using template functors' Feb 95 C++ Report
10//
11//-----------------------------------------------------------------------------
12
13#include <owl/pch.h>
14#include <owl/defs.h>
15#include <owl/functor.h>
16
17namespace owl {
18
19//
20// Functor base class constructor implentation
21//
22TFunctorBase::TFunctorBase(const void* c, const void* f, size_t sz)
23{
24 if (c) {
25 Callee = const_cast<void*>(c);
26 memcpy(MemberFunc, f, sz);
27 }
28 else {
29 Func = f;
30 }
31}
32
33} // OWL namespace
34
const void * Func
Definition functor.h:78
char MemberFunc[sizeof(TMemberFunc)]
ASSUMES this is always enough space.
Definition functor.h:79
C++ Functor template implementation.
Object Windows Library (OWLNext Core)
Definition animctrl.h:22
General definitions used by all ObjectWindows programs.