Ver código fonte

added comment about api break after 2.4.1 (isActive <-> isStateActive)

bohl 10 anos atrás
pai
commit
9ed876c5a8

+ 3 - 3
plugins/org.yakindu.sct.generator.c/src/org/yakindu/sct/generator/c/Statemachine.xtend

@@ -83,18 +83,18 @@ class Statemachine {
 			«ENDFOR»
 			
 			/*!
-			 * Checks if the statemachine is active. 
+			 * Checks if the statemachine is active (until 2.4.1 this method was used for states).
 			 * A statemachine is active if it was entered. It is inactive if it has not been entered at all or if it was exited.
 			 */
 			extern sc_boolean «isActiveFctID»(«scHandleDecl»);
 			
 			/*!
 			 * Checks if all active states are final. 
-			 * If there are no active states then the statemachine is considered as incative and this method returns false.
+			 * If there are no active states then the statemachine is considered as inactive and this method returns false.
 			 */
 			extern sc_boolean «isFinalFctID»(«scHandleDecl»);
 			
-			/*! Checks if the specified state is active. */
+			/*! Checks if the specified state is active (until 2.4.1 the used method for states was calles isActive()). */
 			extern sc_boolean «stateActiveFctID»(«scHandleDecl», «statesEnumType» state);
 			
 			#ifdef __cplusplus

+ 10 - 1
plugins/org.yakindu.sct.generator.cpp/src/org/yakindu/sct/generator/cpp/StatemachineHeader.xtend

@@ -75,7 +75,7 @@ class StatemachineHeader extends Statemachine {
 				
 				«publicFunctionPrototypes»
 				
-				/*! Checks if the specified state is active. */
+				/*! Checks if the specified state is active (until 2.4.1 the used method for states was calles isActive()). */
 				sc_boolean «stateActiveFctID»(«statesEnumType» state);
 			
 			«entry.innerClassVisibility»:
@@ -225,8 +225,17 @@ class StatemachineHeader extends Statemachine {
 		
 		void runCycle();
 		
+		/*!
+		* Checks if the statemachine is active (until 2.4.1 this method was used for states).
+		* A statemachine is active if it was entered. It is inactive if it has not been entered at all or if it was exited.
+		*/
 		sc_boolean isActive();
 		
+		
+		/*!
+		* Checks if all active states are final. 
+		* If there are no active states then the statemachine is considered as inactive and this method returns false.
+		*/
 		sc_boolean isFinal();
 	'''