15 : fTableToDate(), fTableToType()
26 static std::string date;
28 name_map_t::const_reverse_iterator itr =
fTableToDate.rbegin();
29 name_map_t::const_reverse_iterator itrEnd =
fTableToDate.rend();
30 for (; itr != itrEnd; ++itr)
32 ) {
return itr->second; }
39 static std::string type(
"INSERTDATE");
41 name_map_t::const_reverse_iterator itr =
fTableToType.rbegin();
42 name_map_t::const_reverse_iterator itrEnd =
fTableToType.rend();
43 for (; itr != itrEnd; ++itr)
45 ) {
return itr->second; }
54 Bool_t hasChanged = kFALSE;
56 const char* key = keyItr();
59 const char* nextKey = keyItr();
63 if ( ! strncmp(
"Rollback:",key,9) ) {
64 std::string tableName = key+9;
66 const char* dateChars = 0;
67 bool ok = reg.
Get(key,dateChars);
77 int loc = date.size()-1;
78 while ( loc && date[loc] ==
' ' ) { date.erase(loc--); }
84 cout <<
"Illegal Rollback registry item: " << key
85 <<
" = " << dateChars << endl;
91 else if ( ! strncmp(
"RollbackType:",key,13) ) {
92 std::string tableName = key+13;
94 const char* typeChars = 0;
95 bool ok = reg.
Get(key,typeChars);
100 type = type.Strip(TString::kBoth);
101 ok = ! type.CompareTo(
"INSERTDATE") || ! type.CompareTo(
"CREATIONDATE");
107 cout <<
"Illegal RollbackType registry item: " << key
108 <<
" = " << typeChars << endl;
114 if ( hasChanged ) { this->
Show(); }
120 cout <<
"\n\nRollback Status: ";
121 if (
fTableToDate.size() == 0 ) { cout <<
"Not enabled" << endl; }
123 cout <<
"\n\n Dates:- " << endl;
124 name_map_t::const_reverse_iterator itr =
fTableToDate.rbegin();
125 name_map_t::const_reverse_iterator itrEnd =
fTableToDate.rend();
126 for (; itr != itrEnd; ++itr) {
127 std::string
name = itr->first;
128 if ( name.size() < 30 ) { name.append(30-name.size(),
' '); }
129 cout <<
" " << name <<
" " << itr->second << endl;
131 cout <<
"\n Rollback Type is 'INSERTDATE'";
133 cout <<
" except as follows:- " << endl;
136 for (; itr != itrEnd; ++itr) {
137 std::string
name = itr->first;
138 if ( name.size() < 30 ) { name.append(30-name.size(),
' '); }
139 cout <<
" " << name <<
" " << itr->second << endl;