mirror of
https://git.kappach.at/lda/Parsee.git
synced 2025-05-12 22:33:48 +02:00
25 lines
711 B
C
25 lines
711 B
C
#ifndef PARSEE_COMMAND_H
|
|
#define PARSEE_COMMAND_H
|
|
/*-*
|
|
* A Matrix command manager (with a JCL/dd-style format).
|
|
* -----------
|
|
* Written-By: LDA */
|
|
|
|
#include <Cytoplasm/HashMap.h>
|
|
|
|
typedef struct Command {
|
|
char *command;
|
|
HashMap *arguments;
|
|
} Command;
|
|
|
|
typedef struct CommandRouter CommandRouter;
|
|
typedef void (*CommandRoute)(Command *cmd, void *data);
|
|
|
|
extern CommandRouter * CommandCreateRouter(void);
|
|
extern void CommandAddCommand(CommandRouter *rter, char *c, CommandRoute rte);
|
|
extern void RouteCommand(CommandRouter *rter, Command *cmd, void *data);
|
|
extern void CommandFreeRouter(CommandRouter *rter);
|
|
|
|
extern Command * CommandParse(char *cmd);
|
|
extern void CommandFree(Command *command);
|
|
#endif
|