Replace Action with Action* so can be polymorphic
This commit is contained in:
+9
-9
@@ -18,8 +18,8 @@ namespace Parser {
|
||||
public:
|
||||
void setfamily( StateFamily *s_family ) { family = s_family; }
|
||||
Transition input( wchar_t ch );
|
||||
virtual Action enter( void ) { return Ignore(); };
|
||||
virtual Action exit( void ) { return Ignore(); };
|
||||
virtual Action *enter( void ) { return NULL; }
|
||||
virtual Action *exit( void ) { return NULL; }
|
||||
|
||||
State() : family( NULL ) {};
|
||||
virtual ~State() {};
|
||||
@@ -33,7 +33,7 @@ namespace Parser {
|
||||
};
|
||||
|
||||
class Escape : public State {
|
||||
Action enter( void );
|
||||
Action *enter( void );
|
||||
Transition input_state_rule( wchar_t ch );
|
||||
};
|
||||
|
||||
@@ -42,7 +42,7 @@ namespace Parser {
|
||||
};
|
||||
|
||||
class CSI_Entry : public State {
|
||||
Action enter( void );
|
||||
Action *enter( void );
|
||||
Transition input_state_rule( wchar_t ch );
|
||||
};
|
||||
class CSI_Param : public State {
|
||||
@@ -56,7 +56,7 @@ namespace Parser {
|
||||
};
|
||||
|
||||
class DCS_Entry : public State {
|
||||
Action enter( void );
|
||||
Action *enter( void );
|
||||
Transition input_state_rule( wchar_t ch );
|
||||
};
|
||||
class DCS_Param : public State {
|
||||
@@ -66,18 +66,18 @@ namespace Parser {
|
||||
Transition input_state_rule( wchar_t ch );
|
||||
};
|
||||
class DCS_Passthrough : public State {
|
||||
Action enter( void );
|
||||
Action *enter( void );
|
||||
Transition input_state_rule( wchar_t ch );
|
||||
Action exit( void );
|
||||
Action *exit( void );
|
||||
};
|
||||
class DCS_Ignore : public State {
|
||||
Transition input_state_rule( wchar_t ch );
|
||||
};
|
||||
|
||||
class OSC_String : public State {
|
||||
Action enter( void );
|
||||
Action *enter( void );
|
||||
Transition input_state_rule( wchar_t ch );
|
||||
Action exit( void );
|
||||
Action *exit( void );
|
||||
};
|
||||
class SOS_PM_APC_String : public State {
|
||||
Transition input_state_rule( wchar_t ch );
|
||||
|
||||
Reference in New Issue
Block a user