Move everything from global namespace to "sp" namespace
When writing the X11 (linux) implementation there was a problem with X11 defining a "Display" type and we also have a Display class in the engine. So to fix that problem and minimize the risk for running into other name conflicts. We move everything from global namespace.
This commit is contained in:
parent
9da8addeb2
commit
e10daeaaa6
120 changed files with 551 additions and 105 deletions
|
|
@ -5,7 +5,7 @@
|
|||
#include <vector>
|
||||
#include <string>
|
||||
|
||||
namespace File
|
||||
namespace sp { namespace file
|
||||
{
|
||||
std::string getBasename(const std::string& path);
|
||||
|
||||
|
|
@ -14,6 +14,6 @@ namespace File
|
|||
std::string getPathname(const std::string& path);
|
||||
|
||||
std::vector<unsigned char> read(const std::string& path);
|
||||
};
|
||||
} }
|
||||
|
||||
#endif /* SPECTRE_SYSTEM_FILE_H */
|
||||
|
|
|
|||
|
|
@ -2,6 +2,10 @@
|
|||
#ifndef SYSTEM_LOG_H
|
||||
#define SYSTEM_LOG_H
|
||||
|
||||
void log(const char *fmt, ...);
|
||||
namespace sp {
|
||||
|
||||
void log(const char *fmt, ...);
|
||||
|
||||
} // namespace sp
|
||||
|
||||
#endif /* SYSTEM_LOG_H */
|
||||
|
|
|
|||
|
|
@ -4,6 +4,8 @@
|
|||
|
||||
#include "SystemEvent.h"
|
||||
|
||||
namespace sp {
|
||||
|
||||
class Display;
|
||||
|
||||
class MessageHandler
|
||||
|
|
@ -12,4 +14,6 @@ public :
|
|||
virtual void onSizeChanged(Display* display, int width, int height);
|
||||
};
|
||||
|
||||
} // namespace sp
|
||||
|
||||
#endif /* SPECTRE_SYSTEM_MESSAGEHANDLER_H */
|
||||
|
|
@ -5,6 +5,8 @@
|
|||
#include <Spectre/System/SystemEvent.h>
|
||||
#include <queue>
|
||||
|
||||
namespace sp {
|
||||
|
||||
class MessageQueue
|
||||
{
|
||||
public :
|
||||
|
|
@ -18,4 +20,6 @@ protected :
|
|||
std::deque<SysEvent> m_queue;
|
||||
};
|
||||
|
||||
} // namespace sp
|
||||
|
||||
#endif /* SPECTRE_MESSAGE_QUEUE_H */
|
||||
|
|
|
|||
|
|
@ -2,11 +2,12 @@
|
|||
#ifndef SPECTRE_SYSTEM_SYSTEM_H
|
||||
#define SPECTRE_SYSTEM_SYSTEM_H
|
||||
|
||||
namespace System
|
||||
namespace sp { namespace system
|
||||
{
|
||||
unsigned long getMilliseconds();
|
||||
|
||||
void sleep(int milliseconds);
|
||||
};
|
||||
|
||||
} } // namespace sp::system
|
||||
|
||||
#endif /* SPECTRE_SYSTEM_SYSTEM_H */
|
||||
|
|
|
|||
|
|
@ -2,6 +2,8 @@
|
|||
#ifndef SYSTEM_EVENT_H
|
||||
#define SYSTEM_EVENT_H
|
||||
|
||||
namespace sp {
|
||||
|
||||
class Display;
|
||||
|
||||
struct SysEvent
|
||||
|
|
@ -32,7 +34,8 @@ public :
|
|||
// Helper methods
|
||||
|
||||
static SysEvent sizeEvent(Display *display, int width, int height);
|
||||
|
||||
};
|
||||
|
||||
} // namespace sp
|
||||
|
||||
#endif /* SYSTEM_EVENT_H */
|
||||
Loading…
Add table
Add a link
Reference in a new issue