00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
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&);
00064 G__ShadowMaker& operator =(const G__ShadowMaker&);
00065 void GetFullShadowNameRecurse(G__ClassInfo &cl, std::string &fullname);
00066
00067 void UpdateCachedNeedShadow();
00068 #ifndef __CINT__
00069 std::ostream& fOut;
00070 #endif
00071 std::string fNSPrefix;
00072 char fCacheNeedShadow[G__MAXSTRUCT];
00073 int fMaxCachedNeedShadow;
00074 bool (*fNeedShadowClass)(G__ClassInfo &cl);
00075 bool (*fNeedTypedefShadow)(G__ClassInfo &cl);
00076
00077 static bool fgVetoShadow;
00078 };
00079
00080 }
00081
00082 using namespace Cint;
00083
00084 #endif // G__SHADOW_H