Structure d'exemple de table virtuelle

La bibliothèque d’adaptateur vtable (table virtuelle) contient des informations de configuration sur l’adaptateur, notamment les noms des fonctions, les fonctions transactionnelles, etc. Cette vtable est exportée à partir de la bibliothèque DLL/shared de chaque adaptateur. Voici un exemple de structure de vtable.

EXPORT MPI_LIBRARY_VTABLE M4MQS_config = 
{
sizeof(MPI_LIBRARY_VTABLE),
InitializeLibrary,  /* InitializeLibrary */
DestroyLibrary,  /* Destroy Library */
CreateAdapterInstance,  /* CreateAdapterInstance */
DestroyAdapterInstance,  /* DestroyAdapterInstance */
CreateConnectionInstance,  /* CreateConnectionInstance */
DestroyConnectionInstance L,  /* DestroyConnectionInstance */
NULL,  /* CombinedListen */
"-QN % -MID %"  /* Command line mask */
MPI_TRANSACTIONS_SINGLE, /* Transactional mode */
MPI_UNITOFWORK_MESSAGE,  /* Unit of work */
TRUE,  /* Listener interface supported */
FALSE,  /* Listener does not block */
FALSE, /* Listener is not transactional */
TRUE,  /* Retries */

/*** Source Settings ***/
FALSE,  /* Resource manage source */
TRUE,  /* Warnings */
MPI_SCOPE_MAP | MPI_SCOPE_BURST | MPI_SCOPE_CARD,  /* Source scopes */
MPI_ACTION_KEEPONCONTENT | MPI_ACTION_KEEP | 
MPI_ACTION_DELETE, /* Source OnSuccess*/
MPI_ACTION_ROLLBACK | MPI_ACTION_COMMIT,  /* Source OnFailure */
MPI_SCOPE_MAP,  /* Default scope */
MPI_ACTION_DELETE,  /* Default OnSuccess */
MPI_ACTION_ROLLBACK,  /* Default OnFailure */
/*** Target Settings ***/

FALSE,  /* Resource manage target */
TRUE,  /* Warnings */
MPI_SCOPE_MAP | MPI_SCOPE_BURST | MPI_SCOPE_CARD,  /* Target scopes */
MPI_ACTION_CREATEONCONTENT | MPI_ACTION_CREATE,  /* Target OnSuccess */
MPI_ACTION_ROLLBACK | MPI_ACTION_COMMIT,  /* Target OnFailure */
MPI_SCOPE_MAP,  /* Default scope */
MPI_ACTION_CREATE,  /* Default OnSuccess */
MPI_ACTION_ROLLBACK  /* Default OnFailure */
};