aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bindings/cxx/context.cpp4
-rw-r--r--bindings/cxx/include/libswocxx/libswocxx.hpp50
-rw-r--r--bindings/cxx/payloadpacket.cpp4
-rw-r--r--bindings/cxx/sourcepacket.cpp4
-rw-r--r--bindings/cxx/version.cpp4
5 files changed, 32 insertions, 34 deletions
diff --git a/bindings/cxx/context.cpp b/bindings/cxx/context.cpp
index 010df57..2dacf9e 100644
--- a/bindings/cxx/context.cpp
+++ b/bindings/cxx/context.cpp
@@ -77,7 +77,7 @@ void Context::set_log_level(LogLevel level)
throw Error(ret);
}
-string Context::get_log_domain(void) const
+std::string Context::get_log_domain(void) const
{
const char *tmp;
@@ -89,7 +89,7 @@ string Context::get_log_domain(void) const
return tmp;
}
-void Context::set_log_domain(const string &domain)
+void Context::set_log_domain(const std::string &domain)
{
int ret;
diff --git a/bindings/cxx/include/libswocxx/libswocxx.hpp b/bindings/cxx/include/libswocxx/libswocxx.hpp
index d842671..7f70455 100644
--- a/bindings/cxx/include/libswocxx/libswocxx.hpp
+++ b/bindings/cxx/include/libswocxx/libswocxx.hpp
@@ -31,8 +31,6 @@
namespace libswo
{
-using namespace std;
-
enum class LogLevel {
NONE = LIBSWO_LOG_LEVEL_NONE,
ERROR = LIBSWO_LOG_LEVEL_ERROR,
@@ -89,7 +87,7 @@ const unsigned int LOG_DOMAIN_MAX_LENGTH = LIBSWO_LOG_DOMAIN_MAX_LENGTH;
typedef int (*LogCallback)(LogLevel level, const std::string &message,
void *user_data);
-class LIBSWO_API Error : public exception
+class LIBSWO_API Error : public std::exception
{
public:
Error(int error_code);
@@ -106,7 +104,7 @@ public:
PacketType get_type(void) const;
size_t get_size(void) const;
- virtual const string to_string(void) const = 0;
+ virtual const std::string to_string(void) const = 0;
protected:
union libswo_packet _packet;
};
@@ -118,7 +116,7 @@ class LIBSWO_API PayloadPacket : public Packet
public:
virtual ~PayloadPacket(void) = 0;
- const vector<uint8_t> get_data(void) const;
+ const std::vector<uint8_t> get_data(void) const;
static const unsigned int MAX_SIZE = LIBSWO_MAX_PAYLOAD_SIZE;
};
@@ -129,7 +127,7 @@ public:
Unknown(const struct libswo_packet_unknown *packet);
Unknown(const union libswo_packet *packet);
- const string to_string(void) const;
+ const std::string to_string(void) const;
};
class LIBSWO_API Synchronization : public Packet
@@ -138,7 +136,7 @@ public:
Synchronization(const struct libswo_packet_sync *packet);
Synchronization(const union libswo_packet *packet);
- const string to_string(void) const;
+ const std::string to_string(void) const;
};
class LIBSWO_API Overflow : public PayloadPacket
@@ -147,7 +145,7 @@ public:
Overflow(const struct libswo_packet_of *packet);
Overflow(const union libswo_packet *packet);
- const string to_string(void) const;
+ const std::string to_string(void) const;
};
class LIBSWO_API LocalTimestamp : public PayloadPacket
@@ -159,7 +157,7 @@ public:
LocalTimestampRelation get_relation() const;
uint32_t get_value(void) const;
- const string to_string(void) const;
+ const std::string to_string(void) const;
};
class LIBSWO_API GlobalTimestamp1 : public PayloadPacket
@@ -172,7 +170,7 @@ public:
bool get_clkch(void) const;
bool get_wrap(void) const;
- const string to_string(void) const;
+ const std::string to_string(void) const;
};
class LIBSWO_API GlobalTimestamp2 : public PayloadPacket
@@ -183,7 +181,7 @@ public:
uint32_t get_value(void) const;
- const string to_string(void) const;
+ const std::string to_string(void) const;
};
class LIBSWO_API Extension : public PayloadPacket
@@ -195,7 +193,7 @@ public:
ExtensionSource get_source(void) const;
uint32_t get_value(void) const;
- const string to_string(void) const;
+ const std::string to_string(void) const;
};
class LIBSWO_API SourcePacket : public PayloadPacket
@@ -204,10 +202,10 @@ public:
virtual ~SourcePacket(void);
uint8_t get_address(void) const;
- const vector<uint8_t> get_payload(void) const;
+ const std::vector<uint8_t> get_payload(void) const;
uint32_t get_value(void) const;
- virtual const string to_string(void) const = 0;
+ virtual const std::string to_string(void) const = 0;
static const unsigned int MAX_ADDRESS = LIBSWO_MAX_SOURCE_ADDRESS;
};
@@ -218,7 +216,7 @@ public:
Instrumentation(const struct libswo_packet_inst *packet);
Instrumentation(const union libswo_packet *packet);
- const string to_string(void) const;
+ const std::string to_string(void) const;
};
class LIBSWO_API Hardware : public SourcePacket
@@ -227,7 +225,7 @@ public:
Hardware(const struct libswo_packet_hw *packet);
Hardware(const union libswo_packet *packet);
- const string to_string(void) const;
+ const std::string to_string(void) const;
};
class LIBSWO_API EventCounter : public Hardware
@@ -243,7 +241,7 @@ public:
bool get_fold(void) const;
bool get_cyc(void) const;
- const string to_string(void) const;
+ const std::string to_string(void) const;
};
class LIBSWO_API ExceptionTrace : public Hardware
@@ -255,7 +253,7 @@ public:
uint16_t get_exception(void) const;
ExceptionTraceFunction get_function(void) const;
- const string to_string(void) const;
+ const std::string to_string(void) const;
};
class LIBSWO_API PCSample : public Hardware
@@ -267,7 +265,7 @@ public:
bool get_sleep(void) const;
uint32_t get_pc(void) const;
- const string to_string(void) const;
+ const std::string to_string(void) const;
};
class LIBSWO_API PCValue : public Hardware
@@ -279,7 +277,7 @@ public:
uint8_t get_comparator(void) const;
uint32_t get_pc(void) const;
- const string to_string(void) const;
+ const std::string to_string(void) const;
};
class LIBSWO_API AddressOffset : public Hardware
@@ -291,7 +289,7 @@ public:
uint8_t get_comparator(void) const;
uint16_t get_offset(void) const;
- const string to_string(void) const;
+ const std::string to_string(void) const;
};
class LIBSWO_API DataValue : public Hardware
@@ -304,7 +302,7 @@ public:
uint8_t get_comparator(void) const;
uint32_t get_data_value(void) const;
- const string to_string(void) const;
+ const std::string to_string(void) const;
};
class LIBSWO_PRIV DecoderCallbackHelper
@@ -331,8 +329,8 @@ public:
LogLevel get_log_level(void) const;
void set_log_level(LogLevel level);
- string get_log_domain(void) const;
- void set_log_domain(const string &domain);
+ std::string get_log_domain(void) const;
+ void set_log_domain(const std::string &domain);
void set_log_callback(LogCallback callback, void *user_data = NULL);
void set_callback(DecoderCallback callback, void *user_data = NULL);
@@ -353,12 +351,12 @@ public:
static int get_package_major(void);
static int get_package_minor(void);
static int get_package_micro(void);
- static string get_package_string(void);
+ static std::string get_package_string(void);
static int get_library_current(void);
static int get_library_revision(void);
static int get_library_age(void);
- static string get_library_string(void);
+ static std::string get_library_string(void);
};
inline DecoderFlags operator|(DecoderFlags lhs, DecoderFlags rhs)
diff --git a/bindings/cxx/payloadpacket.cpp b/bindings/cxx/payloadpacket.cpp
index a570e6b..c0cb9cf 100644
--- a/bindings/cxx/payloadpacket.cpp
+++ b/bindings/cxx/payloadpacket.cpp
@@ -28,9 +28,9 @@ PayloadPacket::~PayloadPacket(void)
{
}
-const vector<uint8_t> PayloadPacket::get_data(void) const
+const std::vector<uint8_t> PayloadPacket::get_data(void) const
{
- return vector<uint8_t>(_packet.any.data,
+ return std::vector<uint8_t>(_packet.any.data,
_packet.any.data + _packet.any.size);
}
diff --git a/bindings/cxx/sourcepacket.cpp b/bindings/cxx/sourcepacket.cpp
index 4fbf384..fcd57aa 100644
--- a/bindings/cxx/sourcepacket.cpp
+++ b/bindings/cxx/sourcepacket.cpp
@@ -33,9 +33,9 @@ uint8_t SourcePacket::get_address(void) const
return _packet.inst.address;
}
-const vector<uint8_t> SourcePacket::get_payload(void) const
+const std::vector<uint8_t> SourcePacket::get_payload(void) const
{
- return vector<uint8_t>(_packet.inst.payload,
+ return std::vector<uint8_t>(_packet.inst.payload,
_packet.inst.payload + _packet.inst.size - 1);
}
diff --git a/bindings/cxx/version.cpp b/bindings/cxx/version.cpp
index 9e04e94..7bb9e1c 100644
--- a/bindings/cxx/version.cpp
+++ b/bindings/cxx/version.cpp
@@ -37,7 +37,7 @@ int Version::get_package_micro(void)
return libswo_version_package_get_micro();
}
-string Version::get_package_string(void)
+std::string Version::get_package_string(void)
{
return libswo_version_package_get_string();
}
@@ -57,7 +57,7 @@ int Version::get_library_age(void)
return libswo_version_library_get_age();
}
-string Version::get_library_string(void)
+std::string Version::get_library_string(void)
{
return libswo_version_library_get_string();
}