/*! \file piinit.h * \brief Initialization */ /* PIP - Platform Independent Primitives Initialization Ivan Pelipenko peri4ko@yandex.ru This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef PIINIT_H #define PIINIT_H #include "pibase.h" #ifndef MICRO_PIP #include "piincludes.h" class PIFile; class PIStringList; class PIP_EXPORT __PIInit_Initializer__ { public: __PIInit_Initializer__(); ~__PIInit_Initializer__(); static int count_; static PIInit * __instance__; }; static __PIInit_Initializer__ __piinit_initializer__; class PIP_EXPORT PIInit { friend class __PIInit_Initializer__; friend class PIFile; public: ~PIInit(); //! \brief Build options which PIP library was built enum BuildOption { boICU /*! Unicode support */ = 0x01, boUSB /*! USB support */ = 0x02, boCrypt /*! Crypt support */ = 0x08, boIntrospection /*! Introspection */ = 0x010, boFFTW /*! FFTW3 support */ = 0x40, boCompress /*! Zlib compression support */ = 0x80, boOpenCL /*! OpenCL support */ = 0x100, boCloud /*! Cloud transport support */ = 0x200, }; static PIInit * instance() {return __PIInit_Initializer__::__instance__;} static bool isBuildOptionEnabled(BuildOption o); static PIStringList buildOptions(); private: explicit PIInit(); void setFileCharset(const char *charset); bool fileExists(const PIString & p); PRIVATE_DECLARATION(PIP_EXPORT) char * file_charset; }; #endif // MICRO_PIP #endif // PIINIT_H