5#include <WXP/Convert.h>
16 static int message_mask;
20 static int lic_prodman;
22 static char *datapath;
23 static char progname[20];
73 static inline int setError(
int val ){ error = val;
return 1; };
74 static inline bool getError(){
return error; };
77 static inline int getMessageLevel(){
return message_mask; };
85 static int sleep(
float secs );
87 static int outMessage(
const char *mess, ... );
88 static int print(
const char *mess );
89 static int outMessage(
int level,
const char *mess, ... );
90 static int outWarning(
const char *mess, ... );
91 static int outError(
const char *mess, ... );
92 static int outDebug(
const char *mess, ... );
93 static int outDebug(
int level,
const char *mess, ... );
95 static int getVirtMem();
101 static inline int setInitTime(
int val ){
102 init_time = val;
return 1;
105 static inline int getInitTime(){
109 static inline const char *getResrc(
const char *name ){
110 return resrc.
get( name );
112 static inline bool getResrcBool(
const char *name ){
115 static inline const char *getResrc(
const char *name,
const char *def ){
116 return resrc.
get( name, def );
118 static inline float getResrc(
const char *name,
float val ){
119 return resrc.
get( name, val );
121 static inline int getResrc(
const char *name,
int val ){
122 return resrc.
get( name, val );
124 static inline int addResrc(
const char *name,
const char *data,
int type ){
125 return resrc.
add( name, data, type );
127 static inline int putResrc(
const char *name,
const char *data ){
128 return resrc.
put( name, data );
130 static inline int setResrc(
const char *name,
const char *data ){
131 return resrc.
set( name, data );
133 static inline int appendResrc(
const char *name,
const char *data ){
134 return resrc.
append( name, data );
136 static inline int printAllResrc(){
139 static inline const char *nextResrc(){
142 static inline int rewindResrc(){
145 static inline int getResrcType(
const char *name ){
146 return resrc.getType( name );
149 friend class ResrcDB;
This class defines constants used by WXP.
Definition Const.h:5
This defines some simple conversion factors.
Definition Convert.h:13
This class stores a set of resources to be used to set parameters in various objects.
Definition Resrc.h:7
int rewind()
Definition Resrc.cc:432
int printAll()
Definition Resrc.cc:467
int set(const char *name, const char *data)
Definition Resrc.cc:131
int add(const char *name, const char *data, int type)
Definition Resrc.cc:71
int append(const char *name, const char *data, char delim='\n')
Definition Resrc.cc:231
const char * get(const char *name)
Definition Resrc.cc:295
int put(const char *name, const char *data)
Definition Resrc.cc:153
const char * getNext()
Definition Resrc.cc:441
bool getBool(const char *name)
Definition Resrc.cc:367
This class defines basic information and methods used by WXP.
Definition Wxp.h:14
static const char * getDatabasePath()
Definition Wxp.cc:85
static const char * getProgramName()
Definition Wxp.cc:65
static bool isDebug()
Definition Wxp.cc:205
static const char * getVersion()
Definition Wxp.cc:366
static int exit(Error val)
Definition Wxp.cc:357
static int pause()
Definition Wxp.cc:93
static int outError(const char *mess,...)
Definition Wxp.cc:281
static double getTime()
Definition Wxp.cc:328
@ NORUN
Definition Wxp.h:58
@ MISC
Definition Wxp.h:59
@ NOINPUT
Definition Wxp.h:66
@ NOMEMORY
Definition Wxp.h:60
@ NOGRAPH
Definition Wxp.h:61
@ BADPARAM
Definition Wxp.h:68
@ NOINIT
Definition Wxp.h:62
@ NODATA
Definition Wxp.h:67
@ NOERR
Definition Wxp.h:57
@ NODBASE
Definition Wxp.h:64
@ NOWRITE
Definition Wxp.h:65
@ NOFILE
Definition Wxp.h:63
static int sleep(float secs)
Definition Wxp.cc:102
static const char * getLicenseVersion()
Definition Wxp.cc:425
static int outWarning(const char *mess,...)
Definition Wxp.cc:262
static const char * getComputerName()
Definition Wxp.cc:437
static bool validLicense()
Definition Wxp.cc:37
static int print(const char *mess)
Definition Wxp.cc:236
static int outMessage(const char *mess,...)
Definition Wxp.cc:222
static bool checkMessage(int level)
Definition Wxp.cc:197
static int setProgramName(const char *str)
Definition Wxp.cc:56
static int setDatabasePath(const char *str)
Definition Wxp.cc:74
static int setMessageLevel(int val)
Definition Wxp.cc:111
static int outDebug(const char *mess,...)
Definition Wxp.cc:298
All WXP classes fall under the WXP namespace.
Definition Angle.h:4