4 #ifndef ROOT_TSchemaRule
5 #define ROOT_TSchemaRule
21 class TSchemaRule:
public TObject
25 class TSources :
public TNamed {
29 TSources(
const char *name = 0,
const char *title = 0,
const char *dims = 0) : TNamed(name,title),fDimensions(dims) {}
30 const char *GetDimensions() {
return fDimensions; }
42 typedef void (*ReadFuncPtr_t)(
char*, TVirtualObject* );
43 typedef void (*ReadRawFuncPtr_t)(
char*, TBuffer&);
46 virtual ~TSchemaRule();
48 TSchemaRule(
const TSchemaRule& rhs );
49 TSchemaRule& operator = (
const TSchemaRule& rhs );
50 Bool_t operator == (
const TSchemaRule& rhs )
const;
53 void Clear(Option_t * =
"");
54 Bool_t SetFromRule(
const char *rule );
56 const char *GetVersion( )
const;
57 Bool_t SetVersion(
const TString& version );
58 Bool_t TestVersion( Int_t version )
const;
59 Bool_t SetChecksum(
const TString& checksum );
60 Bool_t TestChecksum( UInt_t checksum )
const;
61 void SetSourceClass(
const TString& classname );
62 const char *GetSourceClass()
const;
63 void SetTargetClass(
const TString& classname );
64 const char *GetTargetClass()
const;
65 void SetTarget(
const TString& target );
66 const TObjArray* GetTarget()
const;
67 const char *GetTargetString()
const;
68 void SetSource(
const TString& source );
69 const TObjArray* GetSource()
const;
70 void SetEmbed( Bool_t embed );
71 Bool_t GetEmbed()
const;
72 Bool_t IsAliasRule()
const;
73 Bool_t IsRenameRule()
const;
74 Bool_t IsValid()
const;
75 void SetCode(
const TString& code );
76 const char *GetCode()
const;
77 void SetAttributes(
const TString& attributes );
78 const char *GetAttributes()
const;
79 Bool_t HasTarget(
const TString& target )
const;
81 Bool_t HasSource(
const TString& source )
const;
82 void SetReadFunctionPointer( ReadFuncPtr_t ptr );
83 ReadFuncPtr_t GetReadFunctionPointer()
const;
84 void SetReadRawFunctionPointer( ReadRawFuncPtr_t ptr );
85 ReadRawFuncPtr_t GetReadRawFunctionPointer()
const;
86 void SetInclude(
const TString& include );
87 const TObjArray* GetInclude()
const;
88 void SetRuleType( RuleType_t type );
89 RuleType_t GetRuleType()
const;
90 Bool_t Conflicts(
const TSchemaRule* rule )
const;
92 void AsString( TString &out,
const char *options =
"" )
const;
93 void ls(Option_t *option=
"")
const;
95 ClassDef( TSchemaRule, 1 );
99 Bool_t ProcessVersion(
const TString& version )
const;
100 Bool_t ProcessChecksum(
const TString& checksum )
const;
101 UInt_t ParseChecksum(
const char* checksum )
const;
102 static void ProcessList( TObjArray* array,
const TString& list );
103 static void ProcessDeclaration( TObjArray* array,
const TString& list );
106 mutable std::vector<std::pair<Int_t, Int_t> >* fVersionVect;
108 mutable std::vector<UInt_t>* fChecksumVect;
109 TString fSourceClass;
110 TString fTargetClass;
112 mutable TObjArray* fTargetVect;
114 mutable TObjArray* fSourceVect;
116 mutable TObjArray* fIncludeVect;
119 ReadFuncPtr_t fReadFuncPtr;
120 ReadRawFuncPtr_t fReadRawFuncPtr;
121 RuleType_t fRuleType;
126 #endif // ROOT_TSchemaRule