From 91e9b782cc9ea0252ab2b211b15e8da4a3043d5f Mon Sep 17 00:00:00 2001 From: deva Date: Sat, 2 Jul 2005 11:39:51 +0000 Subject: Added some audiocode. Moved libfame code out of mov_encoder --- src/miav_config.h | 42 ++++++++++++++++++++++++++++++++++++------ 1 file changed, 36 insertions(+), 6 deletions(-) (limited to 'src/miav_config.h') diff --git a/src/miav_config.h b/src/miav_config.h index 4bbcc59..a4c432a 100644 --- a/src/miav_config.h +++ b/src/miav_config.h @@ -31,6 +31,10 @@ /* * $Log$ + * Revision 1.8 2005/07/02 11:39:51 deva + * Added some audiocode. + * Moved libfame code out of mov_encoder + * * Revision 1.7 2005/06/14 12:29:40 deva * Incorporated the use of the Info object everywhere... also using the log functionality. * @@ -52,18 +56,36 @@ using namespace std; // Cyclic include :( class Info; +typedef enum { + CONFIG_UNKNOWN, + CONFIG_INT, + CONFIG_BOOL, + CONFIG_FLOAT, + CONFIG_STRING +} ConfigType; + + typedef struct __cfg { + // For parsing + char* orig; + int line; + char* left; + char* right; + + // For traversal string *name; - bool boolval; + ConfigType type; int intval; - string *stringval; + bool boolval; float floatval; + string *stringval; + struct __cfg* next; } _cfg; class MiavConfig { public: - MiavConfig(char *file, Info *info); + MiavConfig(char *file, Info *info = NULL); ~MiavConfig(); int readInt(char *node); @@ -73,13 +95,21 @@ public: private: Info *info; + string filename; + _cfg *createSemantics(_cfg *cfg); + _cfg* readLines(char* raw); + _cfg* parseLines(_cfg *cfg); + _cfg *parse(char* raw); string emptyString; - string filename; + + +#if 0 _cfg *addConfig(_cfg *parent, char* conf); - int parse(char* conf); char *strip(char* conf); - _cfg *parseError(char* msg, char* line); +#endif + + void parseError(char* msg, _cfg *cfg); _cfg *findNode(char* node); _cfg *configs; }; -- cgit v1.2.3