Changeset 10688 for trunk/FACT++/src/StateMachineImp.cc
- Timestamp:
- 05/12/11 21:52:22 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/src/StateMachineImp.cc
r10657 r10688 109 109 //! Subsequent, i.e. derived classes should setup all allowed state 110 110 //! transitions as well as all allowed configuration event by 111 //! Add Transition, AddConfigurationand AddStateName.111 //! AddEvent and AddStateName. 112 112 //! 113 113 //! @param out … … 492 492 //! greater or equal zero. A negative target state is used to flag 493 493 //! commands which do not initiate a state transition. If this is 494 //! desired use Add Configurationinstead.494 //! desired use AddEvent instead. 495 495 //! 496 496 //! @param name … … 523 523 //! greater or equal zero. A negative target state is used to flag 524 524 //! commands which do not initiate a state transition. If this is 525 //! desired use Add Configurationinstead.525 //! desired use AddEvent instead. 526 526 //! 527 527 //! @param name … … 540 540 //! received commands is properly extracted. No check is done. 541 541 // 542 EventImp &StateMachineImp::Add Transition(int targetstate, const char *name, const char *states, const char *fmt)542 EventImp &StateMachineImp::AddEvent(int targetstate, const char *name, const char *states, const char *fmt) 543 543 { 544 544 EventImp *evt = CreateEvent(targetstate, name, fmt); … … 564 564 //! greater or equal zero. A negative target state is used to flag 565 565 //! commands which do not initiate a state transition. If this is 566 //! desired use Add Configurationinstead.566 //! desired use AddEvent instead. 567 567 //! 568 568 //! @param name … … 575 575 //! by this command. 576 576 // 577 EventImp &StateMachineImp::Add Transition(int targetstate, const char *name, int s1, int s2, int s3, int s4, int s5)577 EventImp &StateMachineImp::AddEvent(int targetstate, const char *name, int s1, int s2, int s3, int s4, int s5) 578 578 { 579 579 ostringstream str; 580 580 str << s1 << ' ' << s2 << ' ' << s3 << ' ' << s4 << ' ' << s5; 581 return Add Transition(targetstate, name, str.str().c_str(), "");581 return AddEvent(targetstate, name, str.str().c_str(), ""); 582 582 } 583 583 … … 592 592 //! greater or equal zero. A negative target state is used to flag 593 593 //! commands which do not initiate a state transition. If this is 594 //! desired use Add Configurationinstead.594 //! desired use AddEvent instead. 595 595 //! 596 596 //! @param name … … 609 609 //! by this command. 610 610 // 611 EventImp &StateMachineImp::Add Transition(int targetstate, const char *name, const char *fmt, int s1, int s2, int s3, int s4, int s5)611 EventImp &StateMachineImp::AddEvent(int targetstate, const char *name, const char *fmt, int s1, int s2, int s3, int s4, int s5) 612 612 { 613 613 ostringstream str; 614 614 str << s1 << ' ' << s2 << ' ' << s3 << ' ' << s4 << ' ' << s5; 615 return Add Transition(targetstate, name, str.str().c_str(), fmt);616 } 617 618 // -------------------------------------------------------------------------- 619 // 620 //! This function calls Add Transitionwith a target-state of -1 which means615 return AddEvent(targetstate, name, str.str().c_str(), fmt); 616 } 617 618 // -------------------------------------------------------------------------- 619 // 620 //! This function calls AddEvent with a target-state of -1 which means 621 621 //! that the command will not change the state at all. This shell be used 622 //! for configuration commands. As well as in Add Transitionthe states in622 //! for configuration commands. As well as in AddEvent the states in 623 623 //! which such a configuration command is accepted can be given. 624 624 //! … … 638 638 //! received commands is properly extracted. No check is done. 639 639 //! 640 EventImp &StateMachineImp::Add Configuration(const char *name, const char *states, const char *fmt)641 { 642 return Add Transition(-1, name, states, fmt);643 } 644 645 // -------------------------------------------------------------------------- 646 // 647 //! This function calls Add Transitionwith a target-state of -1 which means640 EventImp &StateMachineImp::AddEvent(const char *name, const char *states, const char *fmt) 641 { 642 return AddEvent(-1, name, states, fmt); 643 } 644 645 // -------------------------------------------------------------------------- 646 // 647 //! This function calls AddEvent with a target-state of -1 which means 648 648 //! that the command will not change the state at all. This shell be used 649 //! for configuration commands. As well as in Add Transitionthe states in649 //! for configuration commands. As well as in AddEvent the states in 650 650 //! which such a configuration command is accepted can be given. 651 651 //! … … 659 659 //! by this command. 660 660 // 661 EventImp &StateMachineImp::Add Configuration(const char *name, int s1, int s2, int s3, int s4, int s5)662 { 663 return Add Transition(-1, name, s1, s2, s3, s4, s5);664 } 665 666 // -------------------------------------------------------------------------- 667 // 668 //! This function calls Add Transitionwith a target-state of -1 which means661 EventImp &StateMachineImp::AddEvent(const char *name, int s1, int s2, int s3, int s4, int s5) 662 { 663 return AddEvent(-1, name, s1, s2, s3, s4, s5); 664 } 665 666 // -------------------------------------------------------------------------- 667 // 668 //! This function calls AddEvent with a target-state of -1 which means 669 669 //! that the command will not change the state at all. This shell be used 670 //! for configuration commands. As well as in Add Transitionthe states in670 //! for configuration commands. As well as in AddEvent the states in 671 671 //! which such a configuration command is accepted can be given. 672 672 //! … … 686 686 //! by this command. 687 687 // 688 EventImp &StateMachineImp::Add Configuration(const char *name, const char *fmt, int s1, int s2, int s3, int s4, int s5)689 { 690 return Add Transition(-1, name, fmt, s1, s2, s3, s4, s5);688 EventImp &StateMachineImp::AddEvent(const char *name, const char *fmt, int s1, int s2, int s3, int s4, int s5) 689 { 690 return AddEvent(-1, name, fmt, s1, s2, s3, s4, s5); 691 691 } 692 692
Note:
See TracChangeset
for help on using the changeset viewer.