Home > Support > Documentation

rtEXIAutomaton.h

Go to the documentation of this file.
00001 /*
00002  * Copyright (c) 2008 Objective Systems, Inc.
00003  *
00004  * This software is furnished under a license and may be used and copied
00005  * only in accordance with the terms of such license and with the
00006  * inclusion of the above copyright notice. This software or any other
00007  * copies thereof may not be provided or otherwise made available to any
00008  * other person. No title to and ownership of the software is hereby
00009  * transferred.
00010  *
00011  * The information in this software is subject to change without notice
00012  * and should not be construed as a commitment by Objective Systems, Inc.
00013  *
00014  * PROPRIETARY NOTICE
00015  *
00016  * This software is an unpublished work subject to a confidentiality agreement
00017  * and is protected by copyright and trade secret law.  Unauthorized copying,
00018  * redistribution or other use of this work is prohibited.
00019  *
00020  * The above notice of copyright on this source code product does not indicate
00021  * any actual or intended publication of such source code.
00022  *
00023  *****************************************************************************/
00031 #ifndef _RTEXIAUTOMATON_H_
00032 #define _RTEXIAUTOMATON_H_
00033 
00034 #include "rtexisrc/rtEXIEvent.h"
00035 #include "rtexisrc/rtEXIEventCodeGroup.h"
00036 #include "rtxmlsrc/osrtxml.h"
00037 #include "rtxsrc/rtxArrayList.h"
00038 
00039 #ifdef __cplusplus
00040 extern "C" {
00041 #endif
00042 
00043 typedef OSINT16 OSEXIState;
00044 
00048 typedef struct {
00049    OSEXIState fromState;
00050    OSEXIState toState;
00051    const OSEXIEvent* pEvent;
00052    OSEXIEventCode* pEventCode;
00053 } OSEXIStateEvent;
00054 
00058 typedef struct {
00062    OSEXIState numberOfStates;
00063     
00067    OSEXIState currentState;
00068     
00072    OSEXIState acceptingState;
00073     
00078    const OSXMLFullQName* elementName;
00079     
00085    OSRTArrayList eventCodeGroups;
00086     
00092    OSBOOL isClosed;
00093         
00099    OSBOOL matchedBaseEvent;
00100 
00107    OSRTArrayList eventStates;  /* Array of OSEXIStateEvent structures */
00108 
00117    OSEXIEvent* pDynEvent;
00118 
00119 } OSEXIAutomaton;
00120 
00125 typedef struct {
00129    OSEXIState currentState;
00130 
00131 } OSEXIAtmState;
00132 
00141 EXTERNEXI void rtEXIAutomatonInit 
00142 (OSCTXT* pctxt, OSEXIAutomaton* pAutomaton, const OSXMLFullQName* pElemName, 
00143  OSEXIState numStates);
00144 
00155 EXTERNEXI OSEXIAutomaton* rtEXINewAutomaton 
00156 (OSCTXT* pctxt, const OSXMLFullQName* pElemName, OSEXIState numStates);
00157 
00166 EXTERNEXI OSEXIAutomaton* rtEXIAutomatonCopy 
00167 (OSCTXT* pctxt, OSEXIAutomaton* pAutomaton);
00168 
00179 EXTERNEXI OSEXIAutomaton* rtEXIAutomatonAddTransition 
00180 (OSCTXT* pctxt, OSEXIAutomaton* pAutomaton, OSEXIState fromState, 
00181  OSEXIState toState, const OSEXIEventCode* pEventCode);
00182 
00192 EXTERNEXI OSEXIAutomaton* rtEXIAutomatonInitCopy 
00193 (OSCTXT* pctxt, OSEXIAutomaton* pDestAtm, OSEXIAutomaton* pSrcAtm);
00194 
00202 EXTERNEXI int rtEXIAutomatonPush (OSCTXT* pctxt, OSEXIAutomaton* pAutomaton);
00203 
00211 EXTERNEXI OSEXIAutomaton* rtEXIAutomatonPop (OSCTXT* pctxt);
00212 
00220 EXTERNEXI OSEXIEventCodeGroup* 
00221 rtEXIAtmGetCurrentEventCodeGroup (OSEXIAutomaton* pAutomaton);
00222 
00232 EXTERNEXI OSEXIAutomaton* rtEXIGetDocAutomaton 
00233 (OSCTXT* pctxt, 
00234  int (*addTransFunc)(OSCTXT* pctxt, OSEXIAutomaton* pAutomaton, 
00235                      OSEXIState fromState, OSEXIState toState, 
00236                      const OSEXIEvent* pEvent, 
00237                      const OSEXIEventCode* pEventCode));
00238 
00249 EXTERNEXI OSEXIAutomaton* rtEXIGetElemAutomaton 
00250 (OSCTXT* pctxt, OSXMLFullQName* pqname, 
00251  int (*addTransFunc)(OSCTXT* pctxt, OSEXIAutomaton* pAutomaton, 
00252                      OSEXIState fromState, OSEXIState toState, 
00253                      const OSEXIEvent* pEvent, 
00254                      const OSEXIEventCode* pEventCode));
00255 
00256 #ifdef _TRACE
00257 
00264 EXTERNEXI void rtEXIAutomatonPrint 
00265 (OSCTXT* pctxt, const OSEXIAutomaton* pAutomaton);
00266 #endif
00267 
00268 #ifdef __cplusplus
00269 }
00270 #endif
00271 
00274 #endif