WXP C++ Library Version 6.74.9
Loading...
Searching...
No Matches
ResrcFile.h
1#ifndef _WINC_RESRCFILE
2#define _WINC_RESRCFILE
3
4#include <WXP/File.h>
5#include <WXP/Resrc.h>
6#include <WXP/String.h>
7
8namespace WXP {
9 class ResrcFile {
10 File file; /* Resource file */
11 char prog[30];
12 char name[30];
13 char tag[10][20];
14 int num_tag;
15 char match[10];
16 int num_match;
17 bool matches;
18 bool opened;
19
20 public:
21 ResrcFile();
22 ResrcFile( Resrc &resrc );
23 ResrcFile( Resrc &resrc, const char *filename );
24 ~ResrcFile( );
25 bool isOpen();
26 int init();
27 int set( Resrc &resrc );
28 int set( const char *rprog, const char *rname );
29 int setTag( const char *str );
31 inline int clearTag(){ num_tag = 0; return 1; };
32 int open( const char *fname );
33 int close();
34 int get( String &resrc, String &value );
35 int getValid( String &resrc, String &value );
36 int compare( const char *resrc, const char *string );
37 int valid( const char *string );
38 int readFile( Resrc &resrc, const char *filename );
39
40 static int parseName( const char *str, String &resrc );
41 };
42}
43#endif
This class accesses files.
Definition File.h:15
This class reads resource values in from a file.
Definition ResrcFile.h:9
int clearTag()
Definition ResrcFile.h:31
int init()
Definition ResrcFile.cc:23
int getValid(String &resrc, String &value)
Definition ResrcFile.cc:393
ResrcFile()
Definition ResrcFile.cc:36
int get(String &resrc, String &value)
Definition ResrcFile.cc:162
int setTag(const char *str)
Definition ResrcFile.cc:101
~ResrcFile()
Definition ResrcFile.cc:63
int readFile(Resrc &resrc, const char *filename)
Definition ResrcFile.cc:412
static int parseName(const char *str, String &resrc)
Definition ResrcFile.cc:373
int compare(const char *resrc, const char *string)
Definition ResrcFile.cc:283
int open(const char *fname)
Definition ResrcFile.cc:111
int close()
Definition ResrcFile.cc:151
bool isOpen()
Definition ResrcFile.cc:82
int valid(const char *string)
Definition ResrcFile.cc:323
int set(Resrc &resrc)
Definition ResrcFile.cc:71
This class stores a set of resources to be used to set parameters in various objects.
Definition Resrc.h:7
This is a variable length string class.
Definition String.h:5
All WXP classes fall under the WXP namespace.
Definition Angle.h:4