Each module now has its own export macro, which solves the "unresolved symbol" error with sf::Time::Zero
This commit is contained in:
parent
bb7cf47d69
commit
906a62df0f
69 changed files with 450 additions and 180 deletions
48
include/SFML/Network/Export.hpp
Normal file
48
include/SFML/Network/Export.hpp
Normal file
|
@ -0,0 +1,48 @@
|
|||
////////////////////////////////////////////////////////////
|
||||
//
|
||||
// SFML - Simple and Fast Multimedia Library
|
||||
// Copyright (C) 2007-2009 Laurent Gomila (laurent.gom@gmail.com)
|
||||
//
|
||||
// This software is provided 'as-is', without any express or implied warranty.
|
||||
// In no event will the authors be held liable for any damages arising from the use of this software.
|
||||
//
|
||||
// Permission is granted to anyone to use this software for any purpose,
|
||||
// including commercial applications, and to alter it and redistribute it freely,
|
||||
// subject to the following restrictions:
|
||||
//
|
||||
// 1. The origin of this software must not be misrepresented;
|
||||
// you must not claim that you wrote the original software.
|
||||
// If you use this software in a product, an acknowledgment
|
||||
// in the product documentation would be appreciated but is not required.
|
||||
//
|
||||
// 2. Altered source versions must be plainly marked as such,
|
||||
// and must not be misrepresented as being the original software.
|
||||
//
|
||||
// 3. This notice may not be removed or altered from any source distribution.
|
||||
//
|
||||
////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef SFML_NETWORK_EXPORT_HPP
|
||||
#define SFML_NETWORK_EXPORT_HPP
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
// Headers
|
||||
////////////////////////////////////////////////////////////
|
||||
#include <SFML/Config.hpp>
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
// Define portable import / export macros
|
||||
////////////////////////////////////////////////////////////
|
||||
#if defined(SFML_NETWORK_EXPORTS)
|
||||
|
||||
#define SFML_NETWORK_API SFML_API_EXPORT
|
||||
|
||||
#else
|
||||
|
||||
#define SFML_NETWORK_API SFML_API_IMPORT
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#endif // SFML_NETWORK_EXPORT_HPP
|
|
@ -28,9 +28,10 @@
|
|||
////////////////////////////////////////////////////////////
|
||||
// Headers
|
||||
////////////////////////////////////////////////////////////
|
||||
#include <SFML/Network/Export.hpp>
|
||||
#include <SFML/Network/TcpSocket.hpp>
|
||||
#include <SFML/System/NonCopyable.hpp>
|
||||
#include <SFML/System/Time.hpp>
|
||||
#include <SFML/Network/TcpSocket.hpp>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
|
@ -43,7 +44,7 @@ class IpAddress;
|
|||
/// \brief A FTP client
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
class SFML_API Ftp : NonCopyable
|
||||
class SFML_NETWORK_API Ftp : NonCopyable
|
||||
{
|
||||
public :
|
||||
|
||||
|
@ -62,7 +63,7 @@ public :
|
|||
/// \brief Define a FTP response
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
class SFML_API Response
|
||||
class SFML_NETWORK_API Response
|
||||
{
|
||||
public :
|
||||
|
||||
|
@ -184,7 +185,7 @@ public :
|
|||
/// \brief Specialization of FTP response returning a directory
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
class SFML_API DirectoryResponse : public Response
|
||||
class SFML_NETWORK_API DirectoryResponse : public Response
|
||||
{
|
||||
public :
|
||||
|
||||
|
@ -217,7 +218,7 @@ public :
|
|||
/// \brief Specialization of FTP response returning a
|
||||
/// filename lisiting
|
||||
////////////////////////////////////////////////////////////
|
||||
class SFML_API ListingResponse : public Response
|
||||
class SFML_NETWORK_API ListingResponse : public Response
|
||||
{
|
||||
public :
|
||||
|
||||
|
|
|
@ -28,10 +28,11 @@
|
|||
////////////////////////////////////////////////////////////
|
||||
// Headers
|
||||
////////////////////////////////////////////////////////////
|
||||
#include <SFML/System/NonCopyable.hpp>
|
||||
#include <SFML/System/Time.hpp>
|
||||
#include <SFML/Network/Export.hpp>
|
||||
#include <SFML/Network/IpAddress.hpp>
|
||||
#include <SFML/Network/TcpSocket.hpp>
|
||||
#include <SFML/System/NonCopyable.hpp>
|
||||
#include <SFML/System/Time.hpp>
|
||||
#include <map>
|
||||
#include <string>
|
||||
|
||||
|
@ -42,7 +43,7 @@ namespace sf
|
|||
/// \brief A HTTP client
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
class SFML_API Http : NonCopyable
|
||||
class SFML_NETWORK_API Http : NonCopyable
|
||||
{
|
||||
public :
|
||||
|
||||
|
@ -50,7 +51,7 @@ public :
|
|||
/// \brief Define a HTTP request
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
class SFML_API Request
|
||||
class SFML_NETWORK_API Request
|
||||
{
|
||||
public :
|
||||
|
||||
|
@ -187,7 +188,7 @@ public :
|
|||
/// \brief Define a HTTP response
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
class SFML_API Response
|
||||
class SFML_NETWORK_API Response
|
||||
{
|
||||
public :
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
////////////////////////////////////////////////////////////
|
||||
// Headers
|
||||
////////////////////////////////////////////////////////////
|
||||
#include <SFML/Config.hpp>
|
||||
#include <SFML/Network/Export.hpp>
|
||||
#include <SFML/System/Time.hpp>
|
||||
#include <istream>
|
||||
#include <ostream>
|
||||
|
@ -41,7 +41,7 @@ namespace sf
|
|||
/// \brief Encapsulate an IPv4 network address
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
class SFML_API IpAddress
|
||||
class SFML_NETWORK_API IpAddress
|
||||
{
|
||||
public :
|
||||
|
||||
|
@ -201,7 +201,7 @@ private :
|
|||
/// \return True if both addresses are equal
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
SFML_API bool operator ==(const IpAddress& left, const IpAddress& right);
|
||||
SFML_NETWORK_API bool operator ==(const IpAddress& left, const IpAddress& right);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Overload of != operator to compare two IP addresses
|
||||
|
@ -212,7 +212,7 @@ SFML_API bool operator ==(const IpAddress& left, const IpAddress& right);
|
|||
/// \return True if both addresses are different
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
SFML_API bool operator !=(const IpAddress& left, const IpAddress& right);
|
||||
SFML_NETWORK_API bool operator !=(const IpAddress& left, const IpAddress& right);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Overload of < operator to compare two IP addresses
|
||||
|
@ -223,7 +223,7 @@ SFML_API bool operator !=(const IpAddress& left, const IpAddress& right);
|
|||
/// \return True if \a left is lesser than \a right
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
SFML_API bool operator <(const IpAddress& left, const IpAddress& right);
|
||||
SFML_NETWORK_API bool operator <(const IpAddress& left, const IpAddress& right);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Overload of > operator to compare two IP addresses
|
||||
|
@ -234,7 +234,7 @@ SFML_API bool operator <(const IpAddress& left, const IpAddress& right);
|
|||
/// \return True if \a left is greater than \a right
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
SFML_API bool operator >(const IpAddress& left, const IpAddress& right);
|
||||
SFML_NETWORK_API bool operator >(const IpAddress& left, const IpAddress& right);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Overload of <= operator to compare two IP addresses
|
||||
|
@ -245,7 +245,7 @@ SFML_API bool operator >(const IpAddress& left, const IpAddress& right);
|
|||
/// \return True if \a left is lesser or equal than \a right
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
SFML_API bool operator <=(const IpAddress& left, const IpAddress& right);
|
||||
SFML_NETWORK_API bool operator <=(const IpAddress& left, const IpAddress& right);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Overload of >= operator to compare two IP addresses
|
||||
|
@ -256,7 +256,7 @@ SFML_API bool operator <=(const IpAddress& left, const IpAddress& right);
|
|||
/// \return True if \a left is greater or equal than \a right
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
SFML_API bool operator >=(const IpAddress& left, const IpAddress& right);
|
||||
SFML_NETWORK_API bool operator >=(const IpAddress& left, const IpAddress& right);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Overload of >> operator to extract an IP address from an input stream
|
||||
|
@ -267,7 +267,7 @@ SFML_API bool operator >=(const IpAddress& left, const IpAddress& right);
|
|||
/// \return Reference to the input stream
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
SFML_API std::istream& operator >>(std::istream& stream, IpAddress& address);
|
||||
SFML_NETWORK_API std::istream& operator >>(std::istream& stream, IpAddress& address);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Overload of << operator to print an IP address to an output stream
|
||||
|
@ -278,7 +278,7 @@ SFML_API std::istream& operator >>(std::istream& stream, IpAddress& address);
|
|||
/// \return Reference to the output stream
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
SFML_API std::ostream& operator <<(std::ostream& stream, const IpAddress& address);
|
||||
SFML_NETWORK_API std::ostream& operator <<(std::ostream& stream, const IpAddress& address);
|
||||
|
||||
} // namespace sf
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
////////////////////////////////////////////////////////////
|
||||
// Headers
|
||||
////////////////////////////////////////////////////////////
|
||||
#include <SFML/Config.hpp>
|
||||
#include <SFML/Network/Export.hpp>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
|
@ -44,7 +44,7 @@ class UdpSocket;
|
|||
/// over the network
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
class SFML_API Packet
|
||||
class SFML_NETWORK_API Packet
|
||||
{
|
||||
// A bool-like type that cannot be converted to integer or pointer types
|
||||
typedef bool (Packet::*BoolType)(std::size_t);
|
||||
|
|
|
@ -28,6 +28,7 @@
|
|||
////////////////////////////////////////////////////////////
|
||||
// Headers
|
||||
////////////////////////////////////////////////////////////
|
||||
#include <SFML/Network/Export.hpp>
|
||||
#include <SFML/Network/SocketHandle.hpp>
|
||||
#include <SFML/System/NonCopyable.hpp>
|
||||
#include <vector>
|
||||
|
@ -41,7 +42,7 @@ class SocketSelector;
|
|||
/// \brief Base class for all the socket types
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
class SFML_API Socket : NonCopyable
|
||||
class SFML_NETWORK_API Socket : NonCopyable
|
||||
{
|
||||
public :
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
////////////////////////////////////////////////////////////
|
||||
// Headers
|
||||
////////////////////////////////////////////////////////////
|
||||
#include <SFML/Config.hpp>
|
||||
#include <SFML/Network/Export.hpp>
|
||||
#include <SFML/System/Time.hpp>
|
||||
|
||||
|
||||
|
@ -40,7 +40,7 @@ class Socket;
|
|||
/// \brief Multiplexer that allows to read from multiple sockets
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
class SFML_API SocketSelector
|
||||
class SFML_NETWORK_API SocketSelector
|
||||
{
|
||||
public :
|
||||
|
||||
|
|
|
@ -28,6 +28,7 @@
|
|||
////////////////////////////////////////////////////////////
|
||||
// Headers
|
||||
////////////////////////////////////////////////////////////
|
||||
#include <SFML/Network/Export.hpp>
|
||||
#include <SFML/Network/Socket.hpp>
|
||||
|
||||
|
||||
|
@ -39,7 +40,7 @@ class TcpSocket;
|
|||
/// \brief Socket that listens to new TCP connections
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
class SFML_API TcpListener : public Socket
|
||||
class SFML_NETWORK_API TcpListener : public Socket
|
||||
{
|
||||
public :
|
||||
|
||||
|
|
|
@ -28,6 +28,7 @@
|
|||
////////////////////////////////////////////////////////////
|
||||
// Headers
|
||||
////////////////////////////////////////////////////////////
|
||||
#include <SFML/Network/Export.hpp>
|
||||
#include <SFML/Network/Socket.hpp>
|
||||
#include <SFML/System/Time.hpp>
|
||||
|
||||
|
@ -42,7 +43,7 @@ class Packet;
|
|||
/// \brief Specialized socket using the TCP protocol
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
class SFML_API TcpSocket : public Socket
|
||||
class SFML_NETWORK_API TcpSocket : public Socket
|
||||
{
|
||||
public :
|
||||
|
||||
|
|
|
@ -28,6 +28,7 @@
|
|||
////////////////////////////////////////////////////////////
|
||||
// Headers
|
||||
////////////////////////////////////////////////////////////
|
||||
#include <SFML/Network/Export.hpp>
|
||||
#include <SFML/Network/Socket.hpp>
|
||||
#include <vector>
|
||||
|
||||
|
@ -41,7 +42,7 @@ class Packet;
|
|||
/// \brief Specialized socket using the UDP protocol
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
class SFML_API UdpSocket : public Socket
|
||||
class SFML_NETWORK_API UdpSocket : public Socket
|
||||
{
|
||||
public :
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue