Common.h File Reference
#include <sys/socket.h>
#include <cmath>
Include dependency graph for Common.h:
Go to the source code of this file.
Macros | |
#define | _USE_MATH_DEFINES |
#define | DEPRECATED(alternative) |
#define | ELPP_STACKTRACE_ON_CRASH 1 |
#define | PIMPL_OPERATORS(type) |
The usual operators as required for the PIMPL pattern. More... | |
#define | PIMPL_OPERATORS_INHERIT(type, base) |
#define | PIMPL_OPERATORS_INHERIT_IMPL(type, base) |
#define | USCXML_API |
#define | XERCESC_NS xercesc_3_1 |
Detailed Description
- Copyright
- Simplified BSD
Macro Definition Documentation
#define PIMPL_OPERATORS | ( | type | ) |
Value:
type() : _impl() { } \
type(const std::shared_ptr<type##Impl> impl) : _impl(impl) { }\
type(const type& other) : _impl(other._impl) { }\
virtual ~type() { };\
\
operator bool() const {\
return !!_impl;\
}\
bool operator< (const type& other) const {\
return _impl < other._impl;\
}\
bool operator==(const type& other) const {\
return _impl == other._impl;\
}\
bool operator!=(const type& other) const {\
return _impl != other._impl;\
}\
type& operator= (const type& other) {\
_impl = other._impl;\
return *this;\
}
#define PIMPL_OPERATORS_INHERIT | ( | type, | |
base | |||
) |
Value:
type() : _impl() {}\
type(std::shared_ptr<type##Impl> const impl);\
type(const type& other);\
virtual ~type() {};\
\
operator bool() const {\
return !!_impl;\
}\
bool operator< (const type& other) const {\
return _impl < other._impl;\
}\
bool operator==(const type& other) const {\
return _impl == other._impl;\
}\
bool operator!=(const type& other) const {\
return _impl != other._impl;\
}\
type& operator= (const type& other);
#define PIMPL_OPERATORS_INHERIT_IMPL | ( | type, | |
base | |||
) |
Value:
type::type(std::shared_ptr<type##Impl> const impl) : base(impl), _impl(impl) { }\
type::type(const type& other) : base(other._impl), _impl(other._impl) { }\
type& type::operator= (const type& other) {\
_impl = other._impl;\
base::_impl = _impl;\
return *this;\
}