- cmake/FindRTI.cmake: Add INTERFACE placeholder targets when RTI not found - cmake/FindRTI.cmake: Force BUILD_RTI=OFF when RTI not installed - Lts/Common/LtsSession/CMakeLists.txt: Make LtsSessionDataDds conditional on BUILD_RTI - Lts/Viewer/CMakeLists.txt: Make LtsDataView conditional on BUILD_RTI - Lts/Plugins/*/CMakeLists.txt: 97 plugin files wrapped in BUILD_RTI conditionals - cmake/NGLMacros.cmake: Fix NGL_ADD_BIG_RESOURCES macro (removed premature return()) - Multiple Qt6 API fixes: QLinkedList→std::list, QStringRef→QStringView, etc. - BUILD_RTI_FIXES_SUMMARY.md: Comprehensive documentation of all fixes Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
74 lines
1.3 KiB
C++
Executable File
74 lines
1.3 KiB
C++
Executable File
|
|
|
|
|
|
#pragma once
|
|
|
|
#include <string>
|
|
#include <ostream>
|
|
|
|
namespace IDL
|
|
{
|
|
enum class PartitionType
|
|
{
|
|
Any,
|
|
Global,
|
|
Exercise,
|
|
AllExercises,
|
|
Replay,
|
|
};
|
|
|
|
inline std::string toStdString(PartitionType pt)
|
|
{
|
|
switch (pt)
|
|
{
|
|
case PartitionType::Any:
|
|
return "Any";
|
|
case PartitionType::Global:
|
|
return "Global";
|
|
case PartitionType::Exercise:
|
|
return "Exercise";
|
|
case PartitionType::AllExercises:
|
|
return "AllExercises";
|
|
case PartitionType::Replay:
|
|
return "Replay";
|
|
}
|
|
return std::string("invalid:") + std::to_string(static_cast<int>(pt));
|
|
}
|
|
|
|
inline std::ostream& operator <<(std::ostream &o, PartitionType pt)
|
|
{
|
|
|
|
switch (pt)
|
|
{
|
|
case PartitionType::Any:
|
|
case PartitionType::Global:
|
|
case PartitionType::Exercise:
|
|
case PartitionType::AllExercises:
|
|
case PartitionType::Replay:
|
|
return o << std::string("PartitionType::") + toStdString(pt);
|
|
default:
|
|
return o << std::to_string(static_cast<int>(pt));
|
|
}
|
|
}
|
|
|
|
|
|
|
|
inline std::string exercisePartition(int exerciseId)
|
|
{
|
|
if (exerciseId < 0)
|
|
return { "ex_*" };
|
|
return std::string("ex_") + std::to_string(exerciseId);
|
|
}
|
|
|
|
|
|
|
|
inline std::string replayPartition(int partitionId)
|
|
{
|
|
if (partitionId < 0)
|
|
return { "srp_*" };
|
|
return std::string("srp_") + std::to_string(partitionId);
|
|
}
|
|
|
|
}
|
|
|