SDL Visual Test

- Main Page
- Data Structures
- Files

- File List
- Globals

All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Functions
action_configparser.c File Reference
`#include <SDL_stdinc.h>`
`#include <SDL_test.h>`
`#include <string.h>`
`#include "SDL_visualtest_action_configparser.h"`
`#include "SDL_visualtest_rwhelper.h"`
`#include "SDL_visualtest_parsehelper.h"`

## Functions
int | SDLVisualTest_EnqueueAction (SDLVisualTest_ActionQueue *queue, SDLVisualTest_Action action)
int | SDLVisualTest_DequeueAction (SDLVisualTest_ActionQueue *queue)
void | SDLVisualTest_InitActionQueue (SDLVisualTest_ActionQueue *queue)
SDLVisualTest_Action * | SDLVisualTest_GetQueueFront (SDLVisualTest_ActionQueue *queue)
int | SDLVisualTest_IsActionQueueEmpty (SDLVisualTest_ActionQueue *queue)
void | SDLVisualTest_EmptyActionQueue (SDLVisualTest_ActionQueue *queue)
int | SDLVisualTest_InsertIntoActionQueue (SDLVisualTest_ActionQueue *queue, SDLVisualTest_Action action)
int | SDLVisualTest_ParseActionConfig (char *file, SDLVisualTest_ActionQueue *queue)

## Detailed Description

Source file for the parser for action config files.

## Function Documentation

int SDLVisualTest_DequeueAction | ( | SDLVisualTest_ActionQueue * | queue) |  |

Remove an action from the front of the action queue pointed to by `queue`.

Returns
  1 on success, 0 on failure.

void SDLVisualTest_EmptyActionQueue | ( | SDLVisualTest_ActionQueue * | queue) |  |

Dequeues all the elements in the queque pointed to by `queue`.

int SDLVisualTest_EnqueueAction | ( | SDLVisualTest_ActionQueue * | queue,
|  | SDLVisualTest_Action | action
| ) |  |

Add an action pointed to by `action` to the rear of the action queue pointed to by `queue`.

Returns
  1 on success, 0 on failure.

SDLVisualTest_Action* SDLVisualTest_GetQueueFront | ( | SDLVisualTest_ActionQueue * | queue) |  |

Get the action at the front of the action queue pointed to by `queue`. The returned action pointer may become invalid after subsequent dequeues.

Returns
  pointer to the action on success, NULL on failure.

void SDLVisualTest_InitActionQueue | ( | SDLVisualTest_ActionQueue * | queue) |  |

Initialize the action queue pointed to by `queue`.

int SDLVisualTest_InsertIntoActionQueue | ( | SDLVisualTest_ActionQueue * | queue,
|  | SDLVisualTest_Action | action
| ) |  |

Inserts an action `action` into the queue pointed to by `queue` such that the times of actions in the queue increase as we move from the front to the rear.

Returns
  1 on success, 0 on failure.

int SDLVisualTest_IsActionQueueEmpty | ( | SDLVisualTest_ActionQueue * | queue) |  |

Check if the queue pointed to by `queue` is empty or not.

Returns
  1 if the queue is empty, 0 otherwise.

int SDLVisualTest_ParseActionConfig | ( | char * | file,
|  | SDLVisualTest_ActionQueue * | queue
| ) |  |

Parses an action config file with path `file` and populates an action queue pointed to by `queue` with actions.

Returns
  1 on success, 0 on failure.