Book a Demo

Author Topic: Adding Entry, Do and Exit operation definition  (Read 3045 times)

kewld

  • EA Novice
  • *
  • Posts: 1
  • Karma: +0/-0
    • View Profile
Adding Entry, Do and Exit operation definition
« on: July 02, 2015, 03:29:46 am »
I was actually create a state diagram which I am successful at. However I wanted to add Entry, Do and Exit function through EA and be able to put the function definition in some other place or is there any standard way that I can do it where I can regenerate the state diagrams and still leave the generated code untouched?
I do not want to add code directly in the class definition or in the state itself...Hope I am able to convey exactly what i mean...

Code: [Select]
bool CafeSimulation::CafeStates_Deciding_behavior(StateBehaviorEnum behavior)
{
      switch (behavior) {
            case ENTRY:
            {
                  StringStream ss;
                  ss << m_sInstanceName << "[" << m_sType << "]." << "CafeStates_Deciding " << "ENTRY" << endl;
                  GlobalFuncs::trace(ss.str());
                  
//I DO NOT WANT TO ADD CODE HERE SO THAT NEXT TIME I GENERATE THE CODE I NEED NOT PUT THE CODE HERE BACK AGAIN.

            }