Shadow.h

Go to the documentation of this file.
00001 /***********************************************************************
00002  * cint (C/C++ interpreter)
00003  ************************************************************************
00004  * Header file Shadow.h
00005  ************************************************************************
00006  * Description:
00007  *  Shadow class generator for dictionaries
00008  ************************************************************************
00009  * Copyright(c) 1995~2007  Masaharu Goto 
00010  *
00011  * For the licensing terms see the file COPYING
00012  *
00013  ************************************************************************/
00014 /*********************************************************************
00015 * Shadow class functions
00016 *********************************************************************/
00017 
00018 #ifndef G__SHADOW_H
00019 #define G__SHADOW_H 
00020 
00021 
00022 #include <string>
00023 #include <ostream>
00024 #ifndef G__API
00025 #include "Api.h"
00026 #endif
00027 
00028 using std::string;
00029 using std::ostream;
00030 
00031 namespace Cint {
00032 
00033 class
00034 #ifndef __CINT__
00035 G__EXPORT
00036 #endif
00037 G__ShadowMaker {
00038 public:
00039    static bool NeedShadowClass(G__ClassInfo& cl);
00040    G__ShadowMaker(std::ostream& out, const char* nsprefix,
00041       bool(*needShadowClass)(G__ClassInfo &cl)=G__ShadowMaker::NeedShadowClass,
00042       bool(*needTypedefShadow)(G__ClassInfo &cl)=0);
00043 
00044    void WriteAllShadowClasses();
00045 
00046    void WriteShadowClass(G__ClassInfo &cl, int level = 0);
00047    int WriteNamespaceHeader(G__ClassInfo &cl);
00048 
00049    char NeedShadowCached(int tagnum);
00050    
00051    static bool IsSTLCont(const char *type);
00052    static bool IsStdPair(G__ClassInfo &cl);
00053 
00054    static void GetFullyQualifiedName(const char *originalName, std::string &fullyQualifiedName);
00055    static void GetFullyQualifiedName(G__ClassInfo &cl, std::string &fullyQualifiedName);
00056    static void GetFullyQualifiedName(G__TypeInfo &type, std::string &fullyQualifiedName);
00057    static std::string GetNonConstTypeName(G__DataMemberInfo &m, bool fullyQualified = false);
00058    void GetFullShadowName(G__ClassInfo &cl, std::string &fullname);
00059 
00060    static void VetoShadow(bool veto=true);
00061 
00062 private:
00063    G__ShadowMaker(const G__ShadowMaker&); // intentionally not implemented
00064    G__ShadowMaker& operator =(const G__ShadowMaker&); // intentionally not implemented
00065    void GetFullShadowNameRecurse(G__ClassInfo &cl, std::string &fullname);
00066    
00067    void UpdateCachedNeedShadow();  
00068 #ifndef __CINT__
00069    std::ostream& fOut; // where to write to
00070 #endif
00071    std::string fNSPrefix; // shadow classes are in this namespace's namespace "Shadow"
00072    char fCacheNeedShadow[G__MAXSTRUCT]; // whether we need a shadow for a tagnum
00073    int fMaxCachedNeedShadow; // Up to where in G__struct did we calculate the value.
00074    bool (*fNeedShadowClass)(G__ClassInfo &cl); // func deciding whether the shadow is a tyepdef
00075    bool (*fNeedTypedefShadow)(G__ClassInfo &cl); // func deciding whether the shadow is a tyepdef
00076 
00077    static bool fgVetoShadow; // whether WritaAllShadowClasses should write the shadow
00078 };
00079 
00080 } // end namespace Cint
00081 
00082 using namespace Cint;
00083 
00084 #endif // G__SHADOW_H

Generated on Tue Jul 5 14:26:29 2011 for ROOT_528-00b_version by  doxygen 1.5.1