1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51
|
#pragma once
#include "Compiler/Reader.h"
#include "Compiler/SharedLib.h"
namespace storm {
namespace shared {
STORM_PKG(core.lang);
/**
* Reader for shared libraries.
*
* We're not using file readers, as they assume we are reading text files.
*/
class SharedReader : public PkgReader {
STORM_CLASS;
public:
STORM_CTOR SharedReader(Array<Url *> *files, Package *into);
// Get the types.
virtual void STORM_FN readTypes();
// Resolve types.
virtual void STORM_FN resolveTypes();
// Get all functions.
virtual void STORM_FN readFunctions();
private:
// All libraries queued for loading.
Array<CppLoader> *toLoad;
// Load all files if not already done.
void load();
};
namespace win {
STORM_PKG(lang.dll);
// Entry point for Windows.
PkgReader *STORM_FN reader(Array<Url *> *files, Package *pkg);
}
namespace posix {
STORM_PKG(lang.so);
// Entry point for POSIX.
PkgReader *STORM_FN reader(Array<Url *> *files, Package *pkg);
}
}
}
|