diff options
author | deva <deva> | 2005-07-02 11:39:51 +0000 |
---|---|---|
committer | deva <deva> | 2005-07-02 11:39:51 +0000 |
commit | 91e9b782cc9ea0252ab2b211b15e8da4a3043d5f (patch) | |
tree | 335f800ae82b1385b6eb635d34ccc4a84be0a2d9 /src/miav_config.h | |
parent | 55c83847016699a18006f9f728076ab9cd2d873b (diff) |
Added some audiocode.
Moved libfame code out of mov_encoder
Diffstat (limited to 'src/miav_config.h')
-rw-r--r-- | src/miav_config.h | 42 |
1 files changed, 36 insertions, 6 deletions
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; }; |