Refactored CMakeLists.txt
* new pip_module() macro * fixed exports * automatic gather all exports and pass them to Doxygen and PICodeParser
This commit is contained in:
@@ -192,10 +192,10 @@
|
||||
|
||||
// Private data macros
|
||||
|
||||
#define PRIVATE_DECLARATION \
|
||||
#define PRIVATE_DECLARATION(e) \
|
||||
struct __Private__; \
|
||||
friend struct __Private__; \
|
||||
struct __PrivateInitializer__ { \
|
||||
struct e __PrivateInitializer__ { \
|
||||
__PrivateInitializer__(); \
|
||||
__PrivateInitializer__(const __PrivateInitializer__ & o); \
|
||||
~__PrivateInitializer__(); \
|
||||
|
||||
@@ -138,7 +138,7 @@ inline std::ostream & operator <<(std::ostream & s, const PIByteArray & ba);
|
||||
#endif
|
||||
|
||||
//! \relatesalso PIByteArray \brief Output to PICout operator
|
||||
PICout operator <<(PICout s, const PIByteArray & ba);
|
||||
PIP_EXPORT PICout operator <<(PICout s, const PIByteArray & ba);
|
||||
|
||||
#define PBA_OPERATOR_TO int os = s.size_s(); s.enlarge(sizeof(v)); memcpy(s.data(os), &v, sizeof(v));
|
||||
|
||||
@@ -212,7 +212,7 @@ inline PIByteArray & operator >>(PIByteArray & s, ldouble & v) {assert(s.size()
|
||||
//! \relatesalso PIByteArray \brief Restore operator
|
||||
template<typename T> inline PIByteArray & operator >>(PIByteArray & s, PIFlags<T> & v) {PBA_OPERATOR_FROM return s;}
|
||||
//! \relatesalso PIByteArray \brief Restore operator, see \ref PIByteArray_sec1 for details
|
||||
PIByteArray & operator >>(PIByteArray & s, PIByteArray & v);
|
||||
PIP_EXPORT PIByteArray & operator >>(PIByteArray & s, PIByteArray & v);
|
||||
//! \relatesalso PIByteArray \brief Restore operator, see \ref PIByteArray_sec1 for details
|
||||
inline PIByteArray & operator >>(PIByteArray & s, PIByteArray::RawData v) {assert(s.size_s() >= v.s); if (v.s > 0) memcpy((void*)(v.d), s.data(), v.s); s.remove(0, v.s); return s;}
|
||||
|
||||
|
||||
@@ -25,9 +25,9 @@
|
||||
|
||||
#include "piincludes.h"
|
||||
|
||||
extern char * __syslocname__;
|
||||
extern char * __sysoemname__;
|
||||
extern char * __utf8name__;
|
||||
extern PIP_EXPORT char * __syslocname__;
|
||||
extern PIP_EXPORT char * __sysoemname__;
|
||||
extern PIP_EXPORT char * __utf8name__;
|
||||
|
||||
class PIP_EXPORT PIChar
|
||||
{
|
||||
|
||||
@@ -46,7 +46,7 @@ class PIObject;
|
||||
namespace PICoutManipulators {
|
||||
|
||||
//! \brief Enum contains special characters
|
||||
enum PIP_EXPORT PICoutSpecialChar {
|
||||
enum PICoutSpecialChar {
|
||||
Null /*! Null-character, '\\0' */,
|
||||
NewLine /*! New line character, '\\n' */,
|
||||
Tab /*! Tab character, '\\t' */,
|
||||
@@ -55,7 +55,7 @@ namespace PICoutManipulators {
|
||||
};
|
||||
|
||||
//! \brief Enum contains immediate action
|
||||
enum PIP_EXPORT PICoutAction {
|
||||
enum PICoutAction {
|
||||
Flush /*! Flush the output */,
|
||||
Backspace /*! Remove last symbol */,
|
||||
ShowCursor /*! Show cursor */,
|
||||
@@ -67,7 +67,7 @@ namespace PICoutManipulators {
|
||||
};
|
||||
|
||||
//! \brief Enum contains control of PICout
|
||||
enum PIP_EXPORT PICoutControl {
|
||||
enum PICoutControl {
|
||||
AddNone /*! No controls */ = 0x0,
|
||||
AddSpaces /*! Spaces will be appear after each output */ = 0x1,
|
||||
AddNewLine /*! New line will be appear after all output */ = 0x2,
|
||||
@@ -78,7 +78,7 @@ namespace PICoutManipulators {
|
||||
};
|
||||
|
||||
//! \brief Enum contains output format
|
||||
enum PIP_EXPORT PICoutFormat {
|
||||
enum PICoutFormat {
|
||||
Bin /*! Binary representation of integers */ = 0x01,
|
||||
Oct /*! Octal representation of integers */ = 0x02,
|
||||
Dec /*! Decimal representation of integers */ = 0x04,
|
||||
@@ -128,7 +128,7 @@ public:
|
||||
|
||||
~PICout();
|
||||
|
||||
class Notifier {
|
||||
class PIP_EXPORT Notifier {
|
||||
public:
|
||||
static Notifier * instance();
|
||||
static PIObject * object();
|
||||
@@ -291,7 +291,7 @@ private:
|
||||
void applyFormat(PICoutManipulators::PICoutFormat f);
|
||||
|
||||
static OutputDevices devs;
|
||||
PRIVATE_DECLARATION
|
||||
PRIVATE_DECLARATION(PIP_EXPORT)
|
||||
bool fo_, cc_, fc_, act_;
|
||||
int cnb_, attr_, id_;
|
||||
PIString * buffer_;
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
* \snippet piincludes.cpp flags
|
||||
*/
|
||||
template<typename Enum>
|
||||
class PIP_EXPORT PIFlags {
|
||||
class PIFlags {
|
||||
public:
|
||||
//! Constructor with flags = 0
|
||||
PIFlags(): flags(0) {;}
|
||||
|
||||
@@ -39,7 +39,7 @@ class PICout;
|
||||
|
||||
struct lconv;
|
||||
|
||||
extern lconv * currentLocale;
|
||||
extern PIP_EXPORT lconv * currentLocale;
|
||||
|
||||
/*! \fn errorString()
|
||||
* \brief Return readable error description in format "code <number> - <description>" */
|
||||
|
||||
@@ -63,7 +63,7 @@ private:
|
||||
explicit PIInit();
|
||||
void setFileCharset(const char *charset);
|
||||
bool fileExists(const PIString & p);
|
||||
PRIVATE_DECLARATION
|
||||
PRIVATE_DECLARATION(PIP_EXPORT)
|
||||
char * file_charset;
|
||||
};
|
||||
|
||||
|
||||
@@ -800,7 +800,7 @@ public:
|
||||
static bool isTypeOf(const void * o) {return isTypeOf<T>((PIObject*)o);}
|
||||
static PIString simplifyType(const char * a);
|
||||
|
||||
struct __MetaFunc {
|
||||
struct PIP_EXPORT __MetaFunc {
|
||||
__MetaFunc(): addr(0), addrV(0) {;}
|
||||
bool isNull() const {return addr == 0;}
|
||||
PIString arguments() const;
|
||||
@@ -813,7 +813,7 @@ public:
|
||||
PIStringList types;
|
||||
PIStringList names;
|
||||
};
|
||||
struct __MetaData {
|
||||
struct PIP_EXPORT __MetaData {
|
||||
__MetaData() {scope_list << PIStringAscii("PIObject"); scope_id << PIStringAscii("PIObject").hash();}
|
||||
void addScope(const PIString & s, uint shash);
|
||||
PIStringList scope_list;
|
||||
@@ -919,7 +919,7 @@ private:
|
||||
};
|
||||
|
||||
|
||||
void dumpApplication();
|
||||
bool dumpApplicationToFile(const PIString & path);
|
||||
PIP_EXPORT void dumpApplication();
|
||||
PIP_EXPORT bool dumpApplicationToFile(const PIString & path);
|
||||
|
||||
#endif // PIOBJECT_H
|
||||
|
||||
@@ -32,14 +32,14 @@
|
||||
* contains unique name and you can identify property by name with propertyValueByName(), propertyByName().
|
||||
* You can add property using addProperty(const Property&), addProperty(const PIString&, const PIVariant&, const PIString&, int).
|
||||
*/
|
||||
class PIPropertyStorage {
|
||||
class PIP_EXPORT PIPropertyStorage {
|
||||
public:
|
||||
PIPropertyStorage() {}
|
||||
|
||||
/**
|
||||
* @brief PIPropertyStorage element.
|
||||
*/
|
||||
struct Property {
|
||||
struct PIP_EXPORT Property {
|
||||
Property(const PIString & n = PIString(), const PIString & c = PIString(), const PIVariant & v = PIVariant(), int f = 0):
|
||||
name(n), comment(c), value(v), flags(f) {}
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
|
||||
|
||||
template<typename T>
|
||||
class PIP_EXPORT __PIVariantFunctions__ {
|
||||
class __PIVariantFunctions__ {
|
||||
public:
|
||||
static PIString typeNameHelper() {return PIStringAscii("");}
|
||||
|
||||
@@ -59,7 +59,7 @@ struct PIP_EXPORT __PIVariantInfo__ {
|
||||
};
|
||||
|
||||
template<typename T>
|
||||
struct PIP_EXPORT __PIVariantTypeInfo__ {
|
||||
struct __PIVariantTypeInfo__ {
|
||||
typedef T PureType;
|
||||
typedef const T ConstPureType;
|
||||
typedef T * PointerType;
|
||||
@@ -102,7 +102,7 @@ REGISTER_VARIANT_TYPEINFO(ns::classname)
|
||||
|
||||
#define REGISTER_VARIANT_CPP(classname) \
|
||||
template <typename T> \
|
||||
class PIP_EXPORT __##classname##_PIVariantInitializer__ { \
|
||||
class __##classname##_PIVariantInitializer__ { \
|
||||
public: \
|
||||
__##classname##_PIVariantInitializer__(const PIString & name) { \
|
||||
if (__PIVariantInfoStorage__::get()->map->contains(name)) \
|
||||
@@ -115,7 +115,7 @@ public: \
|
||||
|
||||
#define REGISTER_NS_VARIANT_CPP(ns, classname) \
|
||||
template <typename T> \
|
||||
class PIP_EXPORT __##ns##classname##_PIVariantInitializer__ { \
|
||||
class __##ns##classname##_PIVariantInitializer__ { \
|
||||
public: \
|
||||
__##ns##classname##_PIVariantInitializer__(const PIString & name) { \
|
||||
if (__PIVariantInfoStorage__::get()->map->contains(name)) \
|
||||
@@ -155,7 +155,7 @@ PIByteArray __PIVariantFunctions__<classname_from>::castHelper<classname_to>(PIB
|
||||
PIByteArray ret; ret << t; \
|
||||
return ret;} \
|
||||
template <typename T, typename C> \
|
||||
class PIP_EXPORT __##classname_from##_##classname_to##_PIVariantCastInitializer__ { \
|
||||
class __##classname_from##_##classname_to##_PIVariantCastInitializer__ { \
|
||||
public: \
|
||||
__##classname_from##_##classname_to##_PIVariantCastInitializer__(const PIString & name, const PIString & cname) { \
|
||||
__PIVariantInfo__ * vi(__PIVariantInfoStorage__::get()->map->value(name, 0)); \
|
||||
@@ -206,7 +206,7 @@ class PIP_EXPORT PIVariant {
|
||||
public:
|
||||
|
||||
//! Type of %PIVariant content
|
||||
enum PIP_EXPORT Type {
|
||||
enum Type {
|
||||
pivInvalid /** Invalid type , default type of empty contructor */ = 0 ,
|
||||
pivBool /** bool */ ,
|
||||
pivChar /** char */ ,
|
||||
|
||||
Reference in New Issue
Block a user