00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013 #ifndef ROOT_TClassEdit
00014 #define ROOT_TClassEdit
00015
00016 #include "RConfig.h"
00017 #include <string>
00018 #include <vector>
00019
00020 #ifdef R__OLDHPACC
00021 namespace std {
00022 using ::string;
00023 using ::vector;
00024 }
00025 #endif
00026
00027
00028
00029
00030
00031
00032 namespace TClassEdit {
00033
00034 enum EModType {
00035 kNone = 0,
00036 kDropTrailStar = 1<<0,
00037 kDropDefaultAlloc = 1<<1,
00038 kDropAlloc = 1<<2,
00039 kInnerClass = 1<<3,
00040 kInnedMostClass = 1<<4,
00041 kDropStlDefault = 1<<5,
00042 kDropComparator = 1<<6,
00043 kDropAllDefault = 1<<7,
00044 kLong64 = 1<<8
00045 };
00046
00047 enum ESTLType {
00048 kNotSTL = 0,
00049 kVector = 1,
00050 kList = 2,
00051 kDeque = 3,
00052 kMap = 4,
00053 kMultiMap = 5,
00054 kSet = 6,
00055 kMultiSet = 7,
00056 kBitSet = 8,
00057 kEnd = 9
00058 };
00059
00060 struct TSplitType {
00061
00062 const char *fName;
00063 std::vector<std::string> fElements;
00064 int fNestedLocation;
00065
00066 TSplitType(const char *type2split, EModType mode = TClassEdit::kNone);
00067
00068 int IsSTLCont(int testAlloc=0) const;
00069 void ShortType(std::string &answer, int mode);
00070
00071 private:
00072 TSplitType(const TSplitType&);
00073 TSplitType &operator=(const TSplitType &);
00074 };
00075
00076 std::string CleanType (const char *typeDesc,int mode = 0,const char **tail=0);
00077 bool IsDefAlloc(const char *alloc, const char *classname);
00078 bool IsDefAlloc(const char *alloc, const char *keyclassname, const char *valueclassname);
00079 bool IsDefComp (const char *comp , const char *classname);
00080 bool IsSTLBitset(const char *type);
00081 int IsSTLCont (const char *type,int testAlloc=0);
00082 bool IsStdClass(const char *type);
00083 bool IsVectorBool(const char *name);
00084 std::string GetLong64_Name(const std::string& original);
00085 int GetSplit (const char *type, std::vector<std::string> &output, int &nestedLoc, EModType mode = TClassEdit::kNone);
00086 int STLKind (const char *type);
00087 int STLArgs (int kind);
00088 std::string ResolveTypedef(const char *tname, bool resolveAll = false);
00089 std::string ShortType (const char *typeDesc, int mode);
00090 std::string InsertStd(const char *tname);
00091 }
00092
00093 #endif