git-svn-id: svn://db.shs.com.ru/pip@301 12ceb7fc-bf1f-11e4-8940-5bc7170c53b5
This commit is contained in:
@@ -275,6 +275,50 @@ PIInit::~PIInit() {
|
||||
}
|
||||
|
||||
|
||||
bool PIInit::isBuildOptionEnabled(PIInit::BuildOption o) {
|
||||
switch (o) {
|
||||
case ICU: return
|
||||
#ifdef PIP_ICU
|
||||
true;
|
||||
#else
|
||||
false;
|
||||
#endif
|
||||
case USB: return
|
||||
#ifdef PIP_USB
|
||||
true;
|
||||
#else
|
||||
false;
|
||||
#endif
|
||||
case STL: return
|
||||
#ifdef PIP_CONTAINERS_STL
|
||||
true;
|
||||
#else
|
||||
false;
|
||||
#endif
|
||||
case Crypt: return
|
||||
#ifdef PIP_CRYPT
|
||||
true;
|
||||
#else
|
||||
false;
|
||||
#endif
|
||||
case IntrospectionContainers: return
|
||||
#ifdef PIP_INTROSPECTION_CONTAINERS
|
||||
true;
|
||||
#else
|
||||
false;
|
||||
#endif
|
||||
case IntrospectionThreads: return
|
||||
#ifdef PIP_INTROSPECTION_THREADS
|
||||
true;
|
||||
#else
|
||||
false;
|
||||
#endif
|
||||
default: return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
void PIInit::setFileCharset(const char *charset) {
|
||||
if (file_charset) delete file_charset;
|
||||
file_charset = 0;
|
||||
|
||||
@@ -45,7 +45,18 @@ class PIInit {
|
||||
public:
|
||||
PIInit();
|
||||
~PIInit();
|
||||
|
||||
//! \brief Build options which PIP library was built
|
||||
enum BuildOption {
|
||||
ICU /*! Unicode support */ = 0x01,
|
||||
USB /*! USB support */ = 0x02,
|
||||
STL /*! STL containers implementation */ = 0x04,
|
||||
Crypt /*! Crypt support */ = 0x08,
|
||||
IntrospectionContainers /*! Containers introspection */ = 0x010,
|
||||
IntrospectionThreads /*! Threads introspection */ = 0x20
|
||||
};
|
||||
static PIInit * instance() {return __PIInit_Initializer__::__instance__;}
|
||||
static bool isBuildOptionEnabled(BuildOption o);
|
||||
private:
|
||||
void setFileCharset(const char *charset);
|
||||
bool fileExists(const PIString & p);
|
||||
|
||||
@@ -74,6 +74,8 @@ public:
|
||||
const llong * bytesCur_ptr() const {return &bytes_cur;}
|
||||
const PIDiagnostics &diagnostic() {return diag;}
|
||||
|
||||
static uint packetSignature() {return signature;}
|
||||
|
||||
EVENT_HANDLER1(void, received, PIByteArray, data);
|
||||
EVENT_HANDLER(void, stop) {stopSend(); stopReceive();}
|
||||
EVENT_HANDLER(void, pause) {setPause(true);}
|
||||
|
||||
Reference in New Issue
Block a user