14#ifndef XSD_CXX_TREE_EXCEPTIONS_HXX 
   15#define XSD_CXX_TREE_EXCEPTIONS_HXX 
   21#include <xsd/cxx/exceptions.hxx>  
   53        std::basic_ostream<C>&
 
 
   64        print (std::basic_ostream<C>&) 
const = 0;
 
 
  107        operator value ()
 const { 
return v_; }
 
 
  118      template <
typename C>
 
  132               const std::basic_string<C>& res_id,
 
  135               const std::basic_string<C>& 
message);
 
  153        const std::basic_string<C>&
 
  186        const std::basic_string<C>&
 
  204        std::basic_string<C> id_;
 
  206        unsigned long column_;
 
  207        std::basic_string<C> message_;
 
 
  218      template <
typename C>
 
  230      template <
typename C>
 
  273        print (std::basic_ostream<C>&) const;
 
 
  288      template <typename C>
 
  303                          const std::basic_string<C>& ns);
 
  312        const std::basic_string<C>&
 
  323        const std::basic_string<C>&
 
  341        print (std::basic_ostream<C>&) const;
 
  346        std::basic_string<C> name_;
 
  347        std::basic_string<C> namespace__;
 
 
  357      template <typename C>
 
  374                            const std::basic_string<C>& encountered_ns,
 
  375                            const std::basic_string<C>& expected_name,
 
  376                            const std::basic_string<C>& expected_ns);
 
  384        const std::basic_string<C>&
 
  387          return encountered_name_;
 
 
  395        const std::basic_string<C>&
 
  398          return encountered_namespace_;
 
 
  406        const std::basic_string<C>&
 
  409          return expected_name_;
 
 
  417        const std::basic_string<C>&
 
  420          return expected_namespace_;
 
 
  435        print (std::basic_ostream<C>&) const;
 
  440        std::basic_string<C> encountered_name_;
 
  441        std::basic_string<C> encountered_namespace_;
 
  442        std::basic_string<C> expected_name_;
 
  443        std::basic_string<C> expected_namespace_;
 
 
  453      template <typename C>
 
  468                            const std::basic_string<C>& ns);
 
  476        const std::basic_string<C>&
 
  487        const std::basic_string<C>&
 
  505        print (std::basic_ostream<C>&) const;
 
  510        std::basic_string<C> name_;
 
  511        std::basic_string<C> namespace__;
 
 
  521      template <typename C>
 
  541        const std::basic_string<C>&
 
  559        print (std::basic_ostream<C>&) const;
 
  564        std::basic_string<C> enumerator_;
 
 
  574      template <typename C>
 
  590        print (std::basic_ostream<C>&) const;
 
 
  602      template <typename C>
 
  616                      const std::basic_string<C>& type_ns);
 
  624        const std::basic_string<C>&
 
  635        const std::basic_string<C>&
 
  638          return type_namespace_;
 
 
  653        print (std::basic_ostream<C>&) const;
 
  658        std::basic_string<C> type_name_;
 
  659        std::basic_string<C> type_namespace_;
 
 
  668      template <typename C>
 
  682                         const std::basic_string<C>& element_ns);
 
  690        const std::basic_string<C>&
 
  693          return element_name_;
 
 
  701        const std::basic_string<C>&
 
  704          return element_namespace_;
 
 
  719        print (std::basic_ostream<C>&) const;
 
  724        std::basic_string<C> element_name_;
 
  725        std::basic_string<C> element_namespace_;
 
 
  734      template <typename C>
 
  760                     const std::basic_string<C>& base_type_ns,
 
  761                     const std::basic_string<C>& derived_type_name,
 
  762                     const std::basic_string<C>& derived_type_ns);
 
  770        const std::basic_string<C>&
 
  773          return base_type_name_;
 
 
  781        const std::basic_string<C>&
 
  784          return base_type_namespace_;
 
 
  792        const std::basic_string<C>&
 
  795          return derived_type_name_;
 
 
  803        const std::basic_string<C>&
 
  806          return derived_type_namespace_;
 
 
  821        print (std::basic_ostream<C>&) const;
 
  826        std::basic_string<C> base_type_name_;
 
  827        std::basic_string<C> base_type_namespace_;
 
  828        std::basic_string<C> derived_type_name_;
 
  829        std::basic_string<C> derived_type_namespace_;
 
 
  839      template <typename C>
 
  859        const std::basic_string<C>&
 
  877        print (std::basic_ostream<C>&) const;
 
  882        std::basic_string<C> id_;
 
 
  891      template <typename C>
 
  934        print (std::basic_ostream<C>&) const;
 
 
  949      template <typename C>
 
  971        const std::basic_string<C>&
 
  989        print (std::basic_ostream<C>&) const;
 
  994        std::basic_string<C> prefix_;
 
 
 1006      template <typename C>
 
 1022        print (std::basic_ostream<C>&) const;
 
 
 1030#include <xsd/cxx/tree/exceptions.txx> 
Exception indicating that the size argument exceeds the capacity argument.
Definition exceptions.hxx:1008
virtual const char * what() const
Get exception description.
List of error conditions.
Definition exceptions.hxx:220
Exception indicating that a duplicate ID value was encountered in the object model.
Definition exceptions.hxx:841
duplicate_id(const std::basic_string< C > &id)
Initialize an instance with the offending ID value.
const std::basic_string< C > & id() const
Get the offending ID value.
Definition exceptions.hxx:860
virtual const char * what() const
Get exception description.
Error condition.
Definition exceptions.hxx:120
const std::basic_string< C > & message() const
Get error message.
Definition exceptions.hxx:187
tree::severity severity() const
Get error severity.
Definition exceptions.hxx:143
error(tree::severity s, const std::basic_string< C > &res_id, unsigned long line, unsigned long column, const std::basic_string< C > &message)
Initialize an instance with error description.
const std::basic_string< C > & id() const
Get resource id.
Definition exceptions.hxx:154
unsigned long column() const
Get error column.
Definition exceptions.hxx:176
unsigned long line() const
Get error line.
Definition exceptions.hxx:165
Root of the C++/Tree exception hierarchy.
Definition exceptions.hxx:47
friend std::basic_ostream< C > & operator<<(std::basic_ostream< C > &os, const exception &e)
Stream insertion operator for exception.
Definition exceptions.hxx:54
Exception indicating that an expected attribute was not encountered.
Definition exceptions.hxx:455
const std::basic_string< C > & name() const
Get the name of the expected attribute.
Definition exceptions.hxx:477
virtual const char * what() const
Get exception description.
const std::basic_string< C > & namespace_() const
Get the namespace of the expected attribute.
Definition exceptions.hxx:488
expected_attribute(const std::basic_string< C > &name, const std::basic_string< C > &ns)
Initialize an instance with the expected attribute description.
Exception indicating that an expected element was not encountered.
Definition exceptions.hxx:290
const std::basic_string< C > & name() const
Get the name of the expected element.
Definition exceptions.hxx:313
virtual const char * what() const
Get exception description.
const std::basic_string< C > & namespace_() const
Get the namespace of the expected element.
Definition exceptions.hxx:324
expected_element(const std::basic_string< C > &name, const std::basic_string< C > &ns)
Initialize an instance with the expected element description.
Exception indicating that the text content was expected for an element.
Definition exceptions.hxx:576
virtual const char * what() const
Get exception description.
Class corresponding to the XML Schema Name built-in type.
Definition types.hxx:1200
Exception indicating that parsing or serialization information is not available for an element.
Definition exceptions.hxx:670
virtual const char * what() const
Get exception description.
no_element_info(const std::basic_string< C > &element_name, const std::basic_string< C > &element_ns)
Initialize an instance with the element description.
const std::basic_string< C > & element_namespace() const
Get the element namespace.
Definition exceptions.hxx:702
const std::basic_string< C > & element_name() const
Get the element name.
Definition exceptions.hxx:691
Exception indicating that a prefix-namespace mapping was not provided.
Definition exceptions.hxx:951
no_prefix_mapping(const std::basic_string< C > &prefix)
Initialize an instance with the prefix for which the prefix-namespace mapping was not provided.
virtual const char * what() const
Get exception description.
const std::basic_string< C > & prefix() const
Get the prefix for which the prefix-namespace mapping was not provided.
Definition exceptions.hxx:972
Exception indicating that the type information is not available for a type.
Definition exceptions.hxx:604
no_type_info(const std::basic_string< C > &type_name, const std::basic_string< C > &type_ns)
Initialize an instance with the type description.
virtual const char * what() const
Get exception description.
const std::basic_string< C > & type_namespace() const
Get the type namespace.
Definition exceptions.hxx:636
const std::basic_string< C > & type_name() const
Get the type name.
Definition exceptions.hxx:625
Exception indicating that the types are not related by inheritance.
Definition exceptions.hxx:736
const std::basic_string< C > & derived_type_name() const
Get the derived type name.
Definition exceptions.hxx:793
const std::basic_string< C > & derived_type_namespace() const
Get the derived type namespace.
Definition exceptions.hxx:804
const std::basic_string< C > & base_type_namespace() const
Get the base type namespace.
Definition exceptions.hxx:782
not_derived(const std::basic_string< C > &base_type_name, const std::basic_string< C > &base_type_ns, const std::basic_string< C > &derived_type_name, const std::basic_string< C > &derived_type_ns)
Initialize an instance with the type descriptions.
virtual const char * what() const
Get exception description.
const std::basic_string< C > & base_type_name() const
Get the base type name.
Definition exceptions.hxx:771
Exception indicating a parsing failure.
Definition exceptions.hxx:232
parsing()
Default constructor.
virtual const char * what() const
Get exception description.
const tree::diagnostics< C > & diagnostics() const
Get the list of error conditions.
Definition exceptions.hxx:256
parsing(const tree::diagnostics< C > &d)
Initialize an instance with a list of error conditions.
Exception indicating a serialization failure.
Definition exceptions.hxx:893
serialization(const tree::diagnostics< C > &d)
Initialize an instance with a list of error conditions.
serialization()
Default constructor.
virtual const char * what() const
Get exception description.
const tree::diagnostics< C > & diagnostics() const
Get the list of error conditions.
Definition exceptions.hxx:917
Error severity.
Definition exceptions.hxx:76
severity(value v)
Initialize an instance with the underlying enum value.
Definition exceptions.hxx:99
value
Underlying enum type.
Definition exceptions.hxx:82
@ warning
Indicates the warning condition.
Definition exceptions.hxx:86
Exception indicating that an unexpected element was encountered.
Definition exceptions.hxx:359
const std::basic_string< C > & expected_namespace() const
Get the namespace of the expected element.
Definition exceptions.hxx:418
const std::basic_string< C > & expected_name() const
Get the name of the expected element.
Definition exceptions.hxx:407
virtual const char * what() const
Get exception description.
const std::basic_string< C > & encountered_namespace() const
Get the namespace of the encountered element.
Definition exceptions.hxx:396
unexpected_element(const std::basic_string< C > &encountered_name, const std::basic_string< C > &encountered_ns, const std::basic_string< C > &expected_name, const std::basic_string< C > &expected_ns)
Initialize an instance with the encountered and expected element descriptions.
const std::basic_string< C > & encountered_name() const
Get the name of the encountered element.
Definition exceptions.hxx:385
Exception indicating that an unexpected enumerator was encountered.
Definition exceptions.hxx:523
unexpected_enumerator(const std::basic_string< C > &e)
Initialize an instance with the encountered enumerator.
virtual const char * what() const
Get exception description.
const std::basic_string< C > & enumerator() const
Get the value of the encountered enumerator.
Definition exceptions.hxx:542