- 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>
70 lines
1.6 KiB
C++
Executable File
70 lines
1.6 KiB
C++
Executable File
/**
|
|
* Definition of the symbol id
|
|
* $Id$
|
|
* $HeadURL$
|
|
* $Author$
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
namespace SymbologyXML
|
|
{
|
|
|
|
struct symbol_id_t {
|
|
|
|
/**
|
|
* @brief Constructor
|
|
* @param raw value of the symbol id (real symbol id AND flag 'isArtillery')
|
|
*/
|
|
explicit symbol_id_t(unsigned short raw = 0)
|
|
: m_raw(raw)
|
|
{}
|
|
|
|
/**
|
|
* @brief Get the real symbol id
|
|
* @return real symbol id
|
|
*/
|
|
unsigned short symbolId() const { return (m_raw & idMask); }
|
|
|
|
/**
|
|
* @brief Set the real symbol id
|
|
* @param real symbol id
|
|
*/
|
|
void setSymbolId(unsigned short id) { m_raw = ((id & idMask) | (m_raw & bit) );}
|
|
|
|
/**
|
|
* @brief Get flag 'isArtillery'
|
|
* @return 'isArtillery'
|
|
*/
|
|
bool isArtillery() const { return ((m_raw & bit) == bit); }
|
|
|
|
/**
|
|
* @brief Set flag 'isArtillery'
|
|
* @param flag 'isArtillery'
|
|
*/
|
|
void setArtillery(bool bSet) { if(bSet) m_raw |= bit; else m_raw &= ~bit; }
|
|
|
|
/**
|
|
* @brief Get the raw data (e.g. for database insertion)
|
|
* @return
|
|
*/
|
|
unsigned short raw() const { return m_raw; }
|
|
unsigned short &raw() { return m_raw; }
|
|
|
|
/**
|
|
* @brief Set raw value of the symbol id (real symbol id AND flag 'isArtillery')
|
|
* @param raw value
|
|
*/
|
|
void setRaw(unsigned short raw) { m_raw = raw; }
|
|
|
|
bool operator==(const symbol_id_t other) const { return m_raw == other.m_raw; }
|
|
bool operator!=(const symbol_id_t other) const { return !operator==(other); }
|
|
protected:
|
|
// For isArtillery:
|
|
static const unsigned short idMask = 0x7fffU;
|
|
static const unsigned short bit = 0x8000U;
|
|
// raw data:
|
|
unsigned short m_raw;
|
|
};
|
|
|
|
}; // namespace SymbologyXML
|