43 for (
unsigned int i = 0; mFlagValues[i].name; i++) {
44 if (whichOne==mFlagValues[i].value)
45 return mFlagValues[i].name;
47 throw IllegalValue(
"Name not defined for an active flag");
56 for (
int i = 0; mFlagValues[i].name; i++) {
57 if (whichOne==mFlagValues[i].name)
58 return mFlagValues[i].value;
60 throw IllegalValue(
"Name not defined for an active flag");
61 return this->GetNFlags();
72 for (
unsigned int i=0; i<N; i++) {
76 storage.
Store(adapter);
87 for (
unsigned int i=0; i<N; i++) {
93 if (!storage.
Load(adapter))
break;
102 bool * bs =
new bool[N];
103 for (
unsigned int i=N; i--; ) {
106 if (is.flags() & std::ios::skipws) {
110 while (is && isspace(c));
111 if (is) is.putback(c);
116 if (is) is.putback(c);
117 std::cerr <<
"A flag starting with '" << c <<
"'" << std::endl;
121 std::string flagContent;
122 std::getline(is,flagContent,
'}');
123 std::stringstream ss(flagContent);
124 std::string flagName;
125 while (ss>>flagName) {
136 for (
unsigned i=N; i--;) f.
SetFlag(i, bs[i]);
145 for (
unsigned int i=0; i<N; i++) {
147 if (!first) os <<
" ";
170 std::cerr <<
"Name definitions are a NULL pointer" << std::endl;
177 std::cerr <<
"There are more names than flags or there is no NULL name "
178 "at the end of the name array list" << std::endl;
183 for (
unsigned int i=0; i<top; i++) {
184 for (
unsigned int j=i+1; j<top; j++) {
188 <<
"' are replicated" << std::endl;
193 <<
"' are replicated" << std::endl;