Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
RtypesImp.h
Go to the documentation of this file.
1// @(#)root/base:$Id$
2// Author: Philippe Canal 23/2/02
3
4/*************************************************************************
5 * Copyright (C) 1995-2002, Rene Brun, Fons Rademakers and al. *
6 * All rights reserved. *
7 * *
8 * For the licensing terms see $ROOTSYS/LICENSE. *
9 * For the list of contributors see $ROOTSYS/README/CREDITS. *
10 *************************************************************************/
11
12#ifndef ROOT_RtypesImp
13#define ROOT_RtypesImp
14
15#ifndef G__DICTIONARY
16#error RtypesImp.h should only be included by ROOT dictionaries.
17#endif
18
19#include "TMemberInspector.h"
20#include "TError.h"
21
22namespace ROOT {
23namespace Internal {
24 inline void GenericShowMembers(const char *topClassName,
25 void *obj, TMemberInspector &R__insp,
26 bool transientMember)
27 {
28 Warning("ROOT::Internal::GenericShowMembers", "Please regenerate your dictionaries!");
29 R__insp.GenericShowMembers(topClassName, obj, transientMember);
30 }
31
33}
34}
35
36// This is to provide a placement operator new on all platforms
37inline void *operator new(size_t /*size*/, ROOT::Internal::TOperatorNewHelper *p)
38{
39 return((void*)p);
40}
41
42// this should never be used but help quiet down some compiler!
43inline void operator delete(void*, ROOT::Internal::TOperatorNewHelper*) { }
44
45// The STL GenerateInitInstance are not unique and hence are declared static
46// (not accessible outside the dictionary and not linker error for duplicate)
47#if defined(__CINT__)
48#define RootStlStreamer(name,STREAMER)
49#else
50#define RootStlStreamer(name,STREAMER) \
51namespace ROOT { \
52 static TGenericClassInfo *GenerateInitInstance(const name*); \
53 static Short_t _R__UNIQUE_(R__dummyStreamer) = \
54 GenerateInitInstance((name*)0x0)->SetStreamer(STREAMER); \
55 R__UseDummy(_R__UNIQUE_(R__dummyStreamer)); \
56}
57#endif
58
59
60#if defined(__cplusplus)
61/* Helper class to avoid compiler warning about casting function pointer
62** to void pointer.
63*/
64class TFunc2void {
65 typedef void (*funcptr_t)();
66
67 union funcptr_and_voidptr {
68
69 funcptr_and_voidptr(void *val) : _read(val) {}
70
71 void *_read;
72 funcptr_t _write;
73 };
74
75 funcptr_and_voidptr _tmp;
76public:
77 template <typename T>
78 TFunc2void( T vfp ) : _tmp(nullptr) {
79 _tmp._write = ( funcptr_t )vfp;
80 }
81
82 operator void* () const {
83 return _tmp._read;
84 }
85};
86#else
87typedef union {
88 void *_read;
89 void (*_write)();
91#endif
92
93#endif
void Warning(const char *location, const char *msgfmt,...)
Use this function in warning situations.
Definition TError.cxx:229
winID h TVirtualViewer3D TVirtualGLPainter p
Abstract base class for accessing the data-members of a class.
void GenericShowMembers(const char *topClassName, const void *obj, Bool_t transientMember)
void GenericShowMembers(const char *topClassName, void *obj, TMemberInspector &R__insp, bool transientMember)
Definition RtypesImp.h:24
tbb::task_arena is an alias of tbb::interface7::task_arena, which doesn't allow to forward declare tb...