Unifies forward-declations forlder into single point of truth
This commit is contained in:
5 files changed
+55
-61
No files matched your search
@@ -11,4 +11,5 @@ Lts/Tools/ArAssetsV2/build
|
||||
Lts/Tools/ArAssetsV3/build
|
||||
Lts/Tools/ArAssetsV3_Qatar/build
|
||||
build/
|
||||
build2/
|
||||
build2/
|
||||
.envrc
|
||||
@@ -96,7 +96,7 @@ include_directories(${CMAKE_BINARY_DIR}/Lts/Common/LtsUtils/LtsUtilsCore)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/include/Viewer/SituationMap)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/include/OperatorManagement)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/include/FileManagement)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/../../../forward-declarations)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/forward-declarations)
|
||||
SET(CMAKE_CXX_STANDARD 17)
|
||||
SET(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
SET(CMAKE_VISIBILITY_INLINES_HIDDEN ON)
|
||||
|
||||
@@ -1,26 +1,59 @@
|
||||
#pragma once
|
||||
#include <LtsUtils/LtsUtilsCore/data_modification_enum.h>
|
||||
#include <dds/sub/LoanedSamples.hpp>
|
||||
|
||||
// STUB-HEADER: Diese Datei wird normalerweise von ddsdtc generiert
|
||||
// Für die Migration erstellen wir minimale Forward-Declarations
|
||||
|
||||
namespace DDS
|
||||
namespace NGLLogger
|
||||
{
|
||||
class INGLLogger;
|
||||
}
|
||||
|
||||
namespace DTC
|
||||
{
|
||||
class Dtc;
|
||||
class Ftc;
|
||||
class SubscriberListener;
|
||||
|
||||
// Generic DTC Forward-Declarations (Template-Klassen)
|
||||
template<typename T> class GenericDtc;
|
||||
template<typename T> class GenericDtcSampleInfo;
|
||||
template<typename T> class Ddtc;
|
||||
template<typename T> class DdtcSampleInfo;
|
||||
} // namespace DTC
|
||||
} // namespace DDS
|
||||
|
||||
// Generic Namespace für generische DDS-Typen
|
||||
namespace Generic
|
||||
template <typename DRO_OBJECT, typename SC> class GenericDtcSC
|
||||
{
|
||||
class Dtc;
|
||||
class Ftc;
|
||||
} // namespace Generic
|
||||
public:
|
||||
using DataReaderObject = DRO_OBJECT;
|
||||
using SubscriberCallback = SC;
|
||||
using TopicType = typename DRO_OBJECT::TopicType;
|
||||
|
||||
GenericDtcSC() = default;
|
||||
virtual ~GenericDtcSC() = default;
|
||||
|
||||
virtual bool setSubscriberCallback(const SubscriberCallback& subscriberCallback) = 0;
|
||||
virtual dds::sub::LoanedSamples<TopicType> readAlive() const = 0;
|
||||
virtual dds::sub::LoanedSamples<TopicType> takeAlive() const = 0;
|
||||
virtual dds::sub::LoanedSamples<TopicType> takeDisposed() const = 0;
|
||||
virtual bool hasSamples() const = 0;
|
||||
virtual DataReaderObject* dataReader() const = 0;
|
||||
virtual bool waitForHistoricalData(int timeoutMSec) = 0;
|
||||
};
|
||||
|
||||
template <typename DRO_OBJECT>
|
||||
class GenericDtc
|
||||
: public GenericDtcSC<DRO_OBJECT, std::function<void(const typename DRO_OBJECT::TopicType&, DataModification)>>
|
||||
{
|
||||
};
|
||||
|
||||
template <typename DRO_OBJECT>
|
||||
class GenericDtcSampleInfo
|
||||
: public GenericDtcSC<DRO_OBJECT,
|
||||
std::function<void(const typename DRO_OBJECT::TopicType&, const dds::sub::SampleInfo&)>>
|
||||
{
|
||||
};
|
||||
|
||||
template <typename DRO_OBJECT>
|
||||
class Ddtc
|
||||
: public GenericDtcSC<
|
||||
DRO_OBJECT, std::function<void(const typename DRO_OBJECT::TopicType&, const std::string&, DataModification)>>
|
||||
{
|
||||
};
|
||||
|
||||
template <typename DRO_OBJECT>
|
||||
class DdtcSampleInfo
|
||||
: public GenericDtcSC<DRO_OBJECT, std::function<void(const typename DRO_OBJECT::TopicType&, const std::string&,
|
||||
const dds::sub::SampleInfo&)>>
|
||||
{
|
||||
};
|
||||
} // namespace DTC
|
||||
@@ -1,20 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
// STUB-HEADER: Diese Datei wird normalerweise von ddsdtc generiert
|
||||
// Für die Migration erstellen wir minimale Forward-Declarations
|
||||
|
||||
namespace DDS
|
||||
{
|
||||
namespace DTC
|
||||
{
|
||||
class Dtc;
|
||||
class Ftc;
|
||||
} // namespace DTC
|
||||
} // namespace DDS
|
||||
|
||||
// Generic Namespace für generische DDS-Typen
|
||||
namespace Generic
|
||||
{
|
||||
class Dtc;
|
||||
class Ftc;
|
||||
} // namespace Generic
|
||||
@@ -1,20 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
// STUB-HEADER: Diese Datei wird normalerweise von ddsdtc generiert
|
||||
// Für die Migration erstellen wir minimale Forward-Declarations
|
||||
|
||||
namespace DDS
|
||||
{
|
||||
namespace DTC
|
||||
{
|
||||
class Dtc;
|
||||
class Ftc;
|
||||
} // namespace DTC
|
||||
} // namespace DDS
|
||||
|
||||
// Generic Namespace für generische DDS-Typen
|
||||
namespace Generic
|
||||
{
|
||||
class Dtc;
|
||||
class Ftc;
|
||||
} // namespace Generic
|
||||
Reference in new issue
Block a user