1 #ifndef _H_APPCLASS
2 #define _H_APPCLASS
3 
4 //
5 // The contents of this file are subject to the Mozilla Public
6 // License Version 1.1 (the "License"); you may not use this file
7 // except in compliance with the License. You may obtain a copy of
8 // the License at http://www.mozilla.org/MPL/
9 //
10 // Software distributed under the License is distributed on an "AS
11 // IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
12 // implied. See the License for the specific language governing
13 // rights and limitations under the License.
14 //
15 // The Original Code is State Machine Compiler (SMC).
16 //
17 // The Initial Developer of the Original Code is Charles W. Rapp.
18 // Portions created by Charles W. Rapp are
19 // Copyright (C) 2000 - 2003 Charles W. Rapp.
20 // All Rights Reserved.
21 //
22 // Contributor(s):
23 //
24 // Name
25 //	AppClass
26 //
27 // Description
28 //	When a state map executes an action, it is really calling a member function
29 //	in the context class.
30 //
31 // RCS ID
32 // $Id: AppClass.h,v 1.4 2005/05/28 13:31:18 cwrapp Exp $
33 //
34 // CHANGE LOG
35 // $Log: AppClass.h,v $
36 // Revision 1.4  2005/05/28 13:31:18  cwrapp
37 // Updated C++ examples.
38 //
39 // Revision 1.0  2003/12/14 19:19:26  charlesr
40 // Initial revision
41 //
42 
43 #include "AppClass_sm.h"
44 
45 class AppClass
46 {
47 private:
48     AppClassContext _fsm;
49 
50 	bool isAcceptable;
51 		// If a string is acceptable, then this variable is set to true;
52 		// false, otherwise.
53 
54 public:
55 	AppClass();
56 		// Default constructor.
57 
~AppClass()58 	~AppClass() {};
59 		// Destructor.
60 
61 	bool CheckString(const char*);
62 		// Checks if the string is acceptable.
63 
Acceptable()64 	inline void Acceptable()
65 	{ isAcceptable = true; };
66 
Unacceptable()67 	inline void Unacceptable()
68 	{ isAcceptable = false; };
69 		// State machine actions.
70 };
71 
72 #endif
73