Browse Source

Move exported definitions in common.h

test
Michael Uleysky 9 years ago
parent
commit
0ea30b894a
  1. 13
      src/common.h
  2. 4
      src/debug.h
  3. 13
      src/globals.h

13
src/common.h

@ -1,6 +1,19 @@
#ifndef COMMON_H #ifndef COMMON_H
#define COMMON_H #define COMMON_H
#include <iostream>
#include <string>
#define EXPORT __attribute__ ((visibility ("default"))) #define EXPORT __attribute__ ((visibility ("default")))
enum debug_level {INTERNALREQUEST,MOREDEBUG,DEBUG,INFO,NORMAL,WARNING,ERROR};
EXPORT std::ostream& COUT(debug_level dl);
class ObjectBase;
class ObjectList;
typedef ObjectBase* (*Func)(ObjectList*);
extern "C" {
EXPORT void RegisterFunction(const std::string& name, Func func);
}
#endif #endif

4
src/debug.h

@ -3,10 +3,6 @@
#include <iostream> #include <iostream>
#include "common.h" #include "common.h"
enum debug_level {INTERNALREQUEST,MOREDEBUG,DEBUG,INFO,NORMAL,WARNING,ERROR};
EXPORT std::ostream& COUT(debug_level dl);
debug_level SetDebugLevel(debug_level dl=INTERNALREQUEST); debug_level SetDebugLevel(debug_level dl=INTERNALREQUEST);
#endif #endif

13
src/globals.h

@ -7,27 +7,22 @@
// Variables definitions // Variables definitions
typedef std::map<std::string,ObjectBase*> G_varsType; typedef std::map<std::string,ObjectBase*> G_varsType;
extern EXPORT G_varsType G_vars; extern G_varsType G_vars;
// Functions addresses // Functions addresses
typedef ObjectBase* (*Func)(ObjectList*);
typedef std::multimap<std::string,Func> G_funcsType; typedef std::multimap<std::string,Func> G_funcsType;
extern EXPORT G_funcsType G_funcs; extern G_funcsType G_funcs;
typedef std::vector<ObjectList*> G_toType; typedef std::vector<ObjectList*> G_toType;
// List of objects to save // List of objects to save
extern EXPORT G_toType G_tosave; extern G_toType G_tosave;
// List of objects to print // List of objects to print
extern EXPORT G_toType G_toprint; extern G_toType G_toprint;
void ClearGlobals(); void ClearGlobals();
bool Save(ObjectList* input); bool Save(ObjectList* input);
bool Print(ObjectList* input); bool Print(ObjectList* input);
extern "C" {
EXPORT void RegisterFunction(const std::string& name, Func func);
}
#endif #endif

Loading…
Cancel
Save