Hello List,
I would like to have a templated parse function within each of my
states. Unfortunatly I am unable to successfully create a version that
compiles, perhaps if someone could show how to get it to work.
Here is the code:
namespace xml {
class prolog;
template<typename T>
class Entity {
public:
virtual boost::regex regex() const = 0;
virtual void parse(T,T) = 0;
};
class document
: public boost::statechart::state_machine<
document,
prolog
> {
public:
virtual ~document(
) {};
private:
friend class prolog;
static boost::regex character, white_space,
name_start_character,
name_character, name,
names, nmtoken, nmtokens, comment,
process_instruction_target,
process_instruction, CDATA, equal,
version_info, encoding_name,
encoding_declaration,
standalone_document_declaration,
xml_declaration, prolog;
protected:
document(
) {
initiate();
};
template<typename T>
boost::regex regex(
) const {
return state_cast