* a valid range.
*/
const int upper_bound;
+
+ /**
+ * Initial part of description
+ */
+ static const char* description_init;
};
+ const char* Integer::description_init = "[Integer";
/**
* Test for the string being a
* a valid range.
*/
const double upper_bound;
+
+ /**
+ * Initial part of description
+ */
+ static const char* description_init;
};
+ const char* Double::description_init = "[Double";
/**
* Test for the string being one
* the constructor.
*/
std::string sequence;
+
+ /**
+ * Initial part of description
+ */
+ static const char* description_init;
};
+ const char* Selection::description_init = "[Selection";
/**
* the list must have.
*/
const unsigned int max_elements;
+
+ /**
+ * Initial part of description
+ */
+ static const char* description_init;
};
+ const char* List::description_init = "[List";
/**
* This class is much like the
* the constructor.
*/
std::string sequence;
+
+ /**
+ * Initial part of description
+ */
+ static const char* description_init;
};
+ const char* MultipleSelection::description_init = "[MultipleSelection";
/**
* Test for the string being
* function.
*/
virtual PatternBase * clone () const;
+
+ /**
+ * Initial part of description
+ */
+ static const char* description_init;
};
+ const char* Anything::description_init = "[Anything";
}
{
std::ostringstream description;
- description << "[Integer range "
+ description << description_init
+ <<" range "
<< lower_bound << "..." << upper_bound
<< " (inclusive)]";
return description.str();
std::string Double::description () const
{
+ std::ostringstream description;
+
// check whether valid bounds
// were specified, and if so
// output their values
if (lower_bound <= upper_bound)
{
- std::ostringstream description;
-
- description << "[Floating point range "
+ description << description_init
+ << " "
<< lower_bound << "..." << upper_bound
<< " (inclusive)]";
return description.str();
else
// if no bounds were given, then
// return generic string
- return "[Double]";
+ {
+ description << description_init
+ << "]";
+ return description.str();
}
std::string Selection::description () const
{
- return sequence;
+ std::ostringstream description;
+
+ description << description_init
+ << " "
+ << sequence
+ << " ]";
+
+ return description.str();
}
{
std::ostringstream description;
- description << "list of <" << pattern->description() << ">"
+ description << description_init
+ << " list of <" << pattern->description() << ">"
<< " of length " << min_elements << "..." << max_elements
- << " (inclusive)";
+ << " (inclusive)"
+ << "]";
return description.str();
}
std::string MultipleSelection::description () const
{
- return sequence;
+ std::ostringstream description;
+
+ description << description_init
+ << " "
+ << sequence
+ << " ]";
+
+ return description.str();
}
std::string Anything::description () const
{
- return "[Anything]";
+ std::ostringstream description;
+
+ description << description_init
+ << "]"
+
+ return description.str();
}