perf: provide also const char* overloads for convenience functions

This commit is contained in:
Stanislav Angelovič
2024-04-24 20:20:29 +02:00
parent d41a176c2a
commit 7894cda577
31 changed files with 401 additions and 183 deletions
@@ -234,10 +234,10 @@ TYPED_TEST(SdbusTestObject, GetsManagedObjectsSuccessfully)
ASSERT_THAT(objectsInterfacesAndProperties, SizeIs(2));
EXPECT_THAT(objectsInterfacesAndProperties.at(OBJECT_PATH)
.at(org::sdbuscpp::integrationtests_adaptor::INTERFACE_NAME)
.at(sdbus::InterfaceName{org::sdbuscpp::integrationtests_adaptor::INTERFACE_NAME})
.at(ACTION_PROPERTY).template get<uint32_t>(), Eq(DEFAULT_ACTION_VALUE));
EXPECT_THAT(objectsInterfacesAndProperties.at(OBJECT_PATH_2)
.at(org::sdbuscpp::integrationtests_adaptor::INTERFACE_NAME)
.at(sdbus::InterfaceName{org::sdbuscpp::integrationtests_adaptor::INTERFACE_NAME})
.at(ACTION_PROPERTY).template get<uint32_t>(), Eq(DEFAULT_ACTION_VALUE));
}
@@ -16,7 +16,7 @@ namespace sdbuscpp {
class integrationtests_adaptor
{
public:
static inline const sdbus::InterfaceName INTERFACE_NAME{"org.sdbuscpp.integrationtests"};
static constexpr const char* INTERFACE_NAME = "org.sdbuscpp.integrationtests";
protected:
integrationtests_adaptor(sdbus::IObject& object)
@@ -16,7 +16,7 @@ namespace sdbuscpp {
class integrationtests_proxy
{
public:
static inline const sdbus::InterfaceName INTERFACE_NAME{"org.sdbuscpp.integrationtests"};
static constexpr const char* INTERFACE_NAME = "org.sdbuscpp.integrationtests";
protected:
integrationtests_proxy(sdbus::IProxy& proxy)
+1 -1
View File
@@ -16,7 +16,7 @@ namespace sdbuscpp {
class perftests_adaptor
{
public:
static inline const sdbus::InterfaceName INTERFACE_NAME{"org.sdbuscpp.perftests"};
static constexpr const char* INTERFACE_NAME = "org.sdbuscpp.perftests";
protected:
perftests_adaptor(sdbus::IObject& object)
+1 -1
View File
@@ -16,7 +16,7 @@ namespace sdbuscpp {
class perftests_proxy
{
public:
static inline const sdbus::InterfaceName INTERFACE_NAME{"org.sdbuscpp.perftests"};
static constexpr const char* INTERFACE_NAME = "org.sdbuscpp.perftests";
protected:
perftests_proxy(sdbus::IProxy& proxy)
@@ -18,7 +18,7 @@ namespace celsius {
class thermometer_adaptor
{
public:
static inline const sdbus::InterfaceName INTERFACE_NAME{"org.sdbuscpp.stresstests.celsius.thermometer"};
static constexpr const char* INTERFACE_NAME = "org.sdbuscpp.stresstests.celsius.thermometer";
protected:
thermometer_adaptor(sdbus::IObject& object)
@@ -18,7 +18,7 @@ namespace celsius {
class thermometer_proxy
{
public:
static inline const sdbus::InterfaceName INTERFACE_NAME{"org.sdbuscpp.stresstests.celsius.thermometer"};
static constexpr const char* INTERFACE_NAME = "org.sdbuscpp.stresstests.celsius.thermometer";
protected:
thermometer_proxy(sdbus::IProxy& proxy)
+1 -1
View File
@@ -17,7 +17,7 @@ namespace stresstests {
class concatenator_adaptor
{
public:
static inline const sdbus::InterfaceName INTERFACE_NAME{"org.sdbuscpp.stresstests.concatenator"};
static constexpr const char* INTERFACE_NAME = "org.sdbuscpp.stresstests.concatenator";
protected:
concatenator_adaptor(sdbus::IObject& object)
+1 -1
View File
@@ -17,7 +17,7 @@ namespace stresstests {
class concatenator_proxy
{
public:
static inline const sdbus::InterfaceName INTERFACE_NAME{"org.sdbuscpp.stresstests.concatenator"};
static constexpr const char* INTERFACE_NAME = "org.sdbuscpp.stresstests.concatenator";
protected:
concatenator_proxy(sdbus::IProxy& proxy)
@@ -18,7 +18,7 @@ namespace fahrenheit {
class thermometer_adaptor
{
public:
static inline const sdbus::InterfaceName INTERFACE_NAME{"org.sdbuscpp.stresstests.fahrenheit.thermometer"};
static constexpr const char* INTERFACE_NAME = "org.sdbuscpp.stresstests.fahrenheit.thermometer";
protected:
thermometer_adaptor(sdbus::IObject& object)
@@ -56,7 +56,7 @@ namespace thermometer {
class factory_adaptor
{
public:
static inline const sdbus::InterfaceName INTERFACE_NAME{"org.sdbuscpp.stresstests.fahrenheit.thermometer.factory"};
static constexpr const char* INTERFACE_NAME = "org.sdbuscpp.stresstests.fahrenheit.thermometer.factory";
protected:
factory_adaptor(sdbus::IObject& object)
@@ -18,7 +18,7 @@ namespace fahrenheit {
class thermometer_proxy
{
public:
static inline const sdbus::InterfaceName INTERFACE_NAME{"org.sdbuscpp.stresstests.fahrenheit.thermometer"};
static constexpr const char* INTERFACE_NAME = "org.sdbuscpp.stresstests.fahrenheit.thermometer";
protected:
thermometer_proxy(sdbus::IProxy& proxy)
@@ -60,7 +60,7 @@ namespace thermometer {
class factory_proxy
{
public:
static inline const sdbus::InterfaceName INTERFACE_NAME{"org.sdbuscpp.stresstests.fahrenheit.thermometer.factory"};
static constexpr const char* INTERFACE_NAME = "org.sdbuscpp.stresstests.fahrenheit.thermometer.factory";
protected:
factory_proxy(sdbus::IProxy& proxy)