SMC
6_0_1

net.sf.smc.generator
Class SmcHeaderGenerator

java.lang.Object
  extended by net.sf.smc.model.SmcVisitor
      extended by net.sf.smc.generator.SmcCodeGenerator
          extended by net.sf.smc.generator.SmcHeaderGenerator

public final class SmcHeaderGenerator
extends SmcCodeGenerator

Visits the abstract syntax tree emitting a C++ header file.

See Also:
SmcElement, SmcVisitor, SmcCppGenerator, SmcOptions

Field Summary
 
Fields inherited from class net.sf.smc.generator.SmcCodeGenerator
_accessLevel, _castType, _debugLevel, _genericFlag, _graphLevel, _guardCount, _guardIndex, _headerDirectory, _indent, _noCatchFlag, _noExceptionFlag, _noStreamsFlag, _reflectFlag, _serialFlag, _source, _srcDirectory, _srcfileBase, _syncFlag, DEBUG_LEVEL_0, DEBUG_LEVEL_1, GRAPH_LEVEL_0, GRAPH_LEVEL_1, GRAPH_LEVEL_2, NO_DEBUG_OUTPUT, NO_GRAPH_LEVEL
 
Constructor Summary
SmcHeaderGenerator(net.sf.smc.generator.SmcOptions options)
          Creates a C++ header code generator for the given options.
 
Method Summary
 void visit(SmcFSM fsm)
          Emits C++ header code for the finite state machine.
 void visit(SmcMap map)
          Generates the map class declaration and then the state classes:
 void visit(SmcParameter parameter)
          Emits C++ header code for this transition parameter.
 void visit(SmcState state)
          Generates the state's class declaration:
 void visit(SmcTransition transition)
          Generates the transition method declaration:
 
Methods inherited from class net.sf.smc.generator.SmcCodeGenerator
allNilEndStates, escape, isLoopback, scopeStateName, setSource, sourceFile
 
Methods inherited from class net.sf.smc.model.SmcVisitor
visit, visit
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SmcHeaderGenerator

public SmcHeaderGenerator(net.sf.smc.generator.SmcOptions options)
Creates a C++ header code generator for the given options.

Method Detail

visit

public void visit(SmcFSM fsm)
Emits C++ header code for the finite state machine.

Overrides:
visit in class SmcVisitor
Parameters:
fsm - emit C=+ header code for this finite state machine.

visit

public void visit(SmcMap map)
Generates the map class declaration and then the state classes:
 class map name
 {
 public:

     static map name_state name state name;
 };
   

Overrides:
visit in class SmcVisitor
Parameters:
map - emit C++ header code for this map.

visit

public void visit(SmcState state)
Generates the state's class declaration:
 class map name_state name :
     public map name_Default
 {
 public:

     map name_state name(const char *name, int stateId)
     : map name_Default(name, stateId)
     {};

     (declare the transition methods.)
     void transition name(context& context, args);
 };
   

Overrides:
visit in class SmcVisitor
Parameters:
state - emits C++ header code for this state.

visit

public void visit(SmcTransition transition)
Generates the transition method declaration:
 void transition name(contextContext& context, args);
   

Overrides:
visit in class SmcVisitor
Parameters:
transition - emits C++ header code for this state transition.

visit

public void visit(SmcParameter parameter)
Emits C++ header code for this transition parameter.

Overrides:
visit in class SmcVisitor
Parameters:
parameter - emits C++ header code for this transition parameter.

SMC
6_0_1

Copyright © 2009. Charles W. Rapp. All Rights Reserved. Use is subject to license terms.