19 #include <boost/type_traits.hpp>
20 #include <boost/tokenizer.hpp>
21 #include <boost/shared_ptr.hpp>
22 #include <boost/make_shared.hpp>
23 #include <boost/algorithm/string.hpp>
49 <<
" do not match type: " << EI_TypeName::qval <<
";\n"
50 <<
"During declaration of the key: " << EI_KeyName::qval );
75 virtual string type_name()
const {
return "TypeBase"; }
104 {
return typeid(*this) ==
typeid(other); }
108 {
return ! (*
this == other); }
118 static void lazy_finish();
140 virtual bool valid_default(
const string &str)
const =0;
146 virtual std::size_t content_hash()
const =0;
179 static bool is_valid_identifier(
const string& key);
208 static bool was_constructed(
const TypeBase * ptr);
248 : lower_bound_(min_size), upper_bound_(max_size), finished(false)
265 template <
class ValueType>
266 Array(
const ValueType &type,
unsigned int min_size=0,
unsigned int max_size=std::numeric_limits<unsigned int>::max() );
268 std::size_t content_hash()
const override;
271 virtual bool finish();
274 return data_->finished; }
278 ASSERT( data_->finished,
"Getting sub-type from unfinished Array.\n");
279 return *data_->type_of_values_; }
283 return size >=data_->lower_bound_ && size<=data_->upper_bound_; }
286 virtual string type_name()
const;
289 virtual string full_type_name()
const;
299 virtual bool valid_default(
const string &str)
const;
320 virtual string full_type_name()
const;
337 std::size_t content_hash()
const override;
340 bool from_default(
const string &str)
const;
342 virtual string type_name()
const;
344 virtual bool valid_default(
const string &str)
const;
359 Integer(
int lower_bound=std::numeric_limits<int>::min(),
int upper_bound=std::numeric_limits<int>::max())
360 : lower_bound_(lower_bound), upper_bound_(upper_bound)
363 std::size_t content_hash()
const override;
368 bool match(
int value)
const;
373 int from_default(
const string &str)
const;
375 virtual bool valid_default(
const string &str)
const;
377 virtual string type_name()
const;
396 Double(
double lower_bound= -std::numeric_limits<double>::max(),
double upper_bound=std::numeric_limits<double>::max())
397 : lower_bound_(lower_bound), upper_bound_(upper_bound)
400 std::size_t content_hash()
const override;
405 bool match(
double value)
const;
408 virtual bool valid_default(
const string &str)
const;
413 double from_default(
const string &str)
const;
415 virtual string type_name()
const;
432 virtual string type_name()
const;
434 std::size_t content_hash()
const override;
437 string from_default(
const string &str)
const;
442 virtual bool match(
const string &value)
const;
445 virtual bool valid_default(
const string &str)
const;
459 std::size_t content_hash()
const override;
473 virtual string type_name()
const;
476 {
return typeid(*this) ==
typeid(other) &&
477 (type_== static_cast<const FileName *>(&other)->get_file_type() );
481 virtual bool match(
const string &str)
const;
FileType
Possible types of file.
bool operator==(const Null &, const Null &)
Global macros to enhance readability and debugging, general constants.