Nebula
Loading...
Searching...
No Matches
librarybase.h
Go to the documentation of this file.
1#pragma once
2//------------------------------------------------------------------------------
11#include "util/string.h"
12#include "io/uri.h"
13#include "io/stream.h"
14
15//------------------------------------------------------------------------------
16namespace Base
17{
19{
20public:
22 Library();
23
25 void SetPath(const IO::URI& uri);
26
28 virtual bool Load() = 0;
30 virtual void Close() = 0;
32 virtual void* GetExport(Util::String const& name) const = 0;
34 virtual bool IsLoaded() = 0;
35
36protected:
39};
40
41//------------------------------------------------------------------------------
45 : isLoaded(false)
46{
47 // empty
48}
49
50//------------------------------------------------------------------------------
53inline void
55{
56 this->path = uri;
57}
58
59} // namespace Base
60//------------------------------------------------------------------------------
Base class for loading and handling dynamic libraries.
Definition librarybase.h:19
Library()
constructor
Definition librarybase.h:44
virtual void Close()=0
close the library
virtual void * GetExport(Util::String const &name) const =0
get address to exported function (ex. GetProcAddress)
void SetPath(const IO::URI &uri)
set the executable path
Definition librarybase.h:54
bool isLoaded
Definition librarybase.h:37
virtual bool IsLoaded()=0
gets the state of the library
IO::URI path
Definition librarybase.h:38
virtual bool Load()=0
load library
An URI object can split a Uniform Resource Identifier string into its components or build a string fr...
Definition uri.h:67
Definition gamecontentserverbase.cc:10
Nebula's universal string class.
Definition String.cs:8