Initial commit
This commit is contained in:
commit
b7d90b9afe
16245 files changed
+3396666
No files matched your search
@@ -0,0 +1,131 @@
|
||||
/**
|
||||
* @RDE_HEADER@
|
||||
* SituationMap - SituationMapInit
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
* Created by Christian Ehrlicher, SLSE, 2016-02-29
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <ParticipantManagement/ppm_dtc.h>
|
||||
#include <Common/situation_map_logging.h>
|
||||
|
||||
#include <Map/generic_object_factory.h>
|
||||
#include <Map/map.h>
|
||||
#include <Map/map_initializer.h>
|
||||
#include <Map/object_factory.h>
|
||||
#include <Map/party_id_to_color_functor.h>
|
||||
|
||||
#include <MapImpl/sidc_symbol_impl.h>
|
||||
#include <MapImpl/sight_fan_impl.h>
|
||||
|
||||
#include <MapObjectsImpl/air_support_impl.h>
|
||||
#include <MapObjectsImpl/area_fire_impl.h>
|
||||
#include <MapObjectsImpl/biological_agent_impl.h>
|
||||
#include <MapObjectsImpl/building_outline_impl.h>
|
||||
#include <MapObjectsImpl/chemical_agent_impl.h>
|
||||
#include <MapObjectsImpl/cube_impl.h>
|
||||
#include <MapObjectsImpl/danger_area_impl.h>
|
||||
#include <MapObjectsImpl/functional_area_impl.h>
|
||||
#include <MapObjectsImpl/geo_image_impl.h>
|
||||
#include <MapObjectsImpl/hit_line_impl.h>
|
||||
#include <MapObjectsImpl/map_object_attributes_impl.h>
|
||||
#include <MapObjectsImpl/map_object_indicator_impl.h>
|
||||
#include <MapObjectsImpl/mine_field_impl.h>
|
||||
#include <MapObjectsImpl/mine_impl.h>
|
||||
#include <MapObjectsImpl/nine_liner_impl.h>
|
||||
#include <MapObjectsImpl/nuclear_agent_impl.h>
|
||||
#include <MapObjectsImpl/participant_impl.h>
|
||||
#include <MapObjectsImpl/polygon_impl.h>
|
||||
#include <MapObjectsImpl/polyline_impl.h>
|
||||
#include <MapObjectsImpl/single_fire_impl.h>
|
||||
#include <MapObjectsImpl/sound_area_impl.h>
|
||||
#include <MapObjectsImpl/text_impl.h>
|
||||
#include <MapObjectsImpl/virtual_mine_impl.h>
|
||||
|
||||
namespace ParticipantManagement
|
||||
{
|
||||
class Party;
|
||||
}
|
||||
|
||||
namespace SituationMap
|
||||
{
|
||||
//-----------------------------------------------------------------------------
|
||||
class ThatMapInitializer : public MapInitializer
|
||||
{
|
||||
Q_OBJECT
|
||||
typedef MapInitializer BaseClass;
|
||||
|
||||
public:
|
||||
|
||||
explicit ThatMapInitializer(Map &map,
|
||||
MapSettings &mapSettings,
|
||||
const QString &debugName,
|
||||
QObject *parent)
|
||||
: BaseClass(map, mapSettings, debugName, parent)
|
||||
{}
|
||||
|
||||
bool initializeObjectFactory() override
|
||||
{
|
||||
ObjectFactory::registerMe(typeid(MapObjectIndicator), new GenericObjectFactory<MapObjectIndicatorImpl>());
|
||||
ObjectFactory::registerMe(typeid(Cube), new GenericObjectFactory<CubeImpl>());
|
||||
|
||||
ObjectFactory::registerMe(typeid(Polygon), new GenericObjectFactory<PolygonImpl>());
|
||||
ObjectFactory::registerMe(typeid(Polyline), new GenericObjectFactory<PolylineImpl>());
|
||||
ObjectFactory::registerMe(typeid(Text), new GenericObjectFactory<TextImpl>());
|
||||
|
||||
ObjectFactory::registerMe(typeid(Participant), new GenericObjectFactory<ParticipantImpl>());
|
||||
ObjectFactory::registerMe(typeid(AreaFire), new GenericObjectFactory<AreaFireImpl>());
|
||||
ObjectFactory::registerMe(typeid(AirSupport), new GenericObjectFactory<AirSupportImpl>());
|
||||
ObjectFactory::registerMe(typeid(BiologicalAgent), new GenericObjectFactory<BiologicalAgentImpl>());
|
||||
ObjectFactory::registerMe(typeid(ChemicalAgent), new GenericObjectFactory<ChemicalAgentImpl>());
|
||||
ObjectFactory::registerMe(typeid(BuildingOutline), new GenericObjectFactory<BuildingOutlineImpl>());
|
||||
ObjectFactory::registerMe(typeid(DangerArea), new GenericObjectFactory<DangerAreaImpl>());
|
||||
ObjectFactory::registerMe(typeid(GeoImage), new GenericObjectFactory<GeoImageImpl>() );
|
||||
ObjectFactory::registerMe(typeid(FunctionalArea), new GenericObjectFactory<FunctionalAreaImpl>());
|
||||
ObjectFactory::registerMe(typeid(HitLine), new GenericObjectFactory<HitLineImpl>());
|
||||
ObjectFactory::registerMe(typeid(SituationMap::MapObjectAttributes), new GenericObjectFactory<SituationMap::MapObjectAttributesImpl>() );
|
||||
ObjectFactory::registerMe(typeid(Mine), new GenericObjectFactory<MineImpl>());
|
||||
ObjectFactory::registerMe(typeid(MineField), new GenericObjectFactory<MineFieldImpl>());
|
||||
ObjectFactory::registerMe(typeid(NineLiner), new GenericObjectFactory<NineLinerImpl>());
|
||||
ObjectFactory::registerMe(typeid(NuclearAgent), new GenericObjectFactory<NuclearAgentImpl>());
|
||||
ObjectFactory::registerMe(typeid(SingleFire), new GenericObjectFactory<SingleFireImpl>());
|
||||
// ObjectFactory::registerMe(typeid(SingleFireCentral), new GenericObjectFactory<SingleFireCentralImpl>());
|
||||
ObjectFactory::registerMe(typeid(SoundArea), new GenericObjectFactory<SoundAreaImpl>());
|
||||
ObjectFactory::registerMe(typeid(VirtualMine), new GenericObjectFactory<VirtualMineImpl>());
|
||||
|
||||
ObjectFactory::registerMe(typeid(SidcSymbol), new GenericObjectFactory<SidcSymbolImpl>());
|
||||
|
||||
SituationMap::ObjectFactory::registerMe(typeid(SituationMap::SightFan), new SituationMap::GenericObjectFactory<SituationMap::SightFanImpl>());
|
||||
|
||||
return true;
|
||||
} // initializeObjectFactory()
|
||||
|
||||
|
||||
}; // ThatMapInitializer
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
class ThatPartyIdToColorFunctor final : public PartyIdToColorFunctor
|
||||
{
|
||||
Q_OBJECT
|
||||
typedef PartyIdToColorFunctor BaseClass;
|
||||
|
||||
public:
|
||||
explicit ThatPartyIdToColorFunctor(const std::shared_ptr<ParticipantManagement::Interface::Dtc> &ppmDtc);
|
||||
~ThatPartyIdToColorFunctor() = default;
|
||||
|
||||
bool doRemovePartyFlag() const { return m_doRemovePartyFlag; }
|
||||
void setDoRemovePartyFlag(bool doRemoveParty) { m_doRemovePartyFlag = doRemoveParty; }
|
||||
|
||||
protected Q_SLOTS:
|
||||
void onPartyChanged(const ParticipantManagement::Party &data, DataModification modType = DataModification::eAdded);
|
||||
|
||||
private:
|
||||
bool m_doRemovePartyFlag = true;
|
||||
std::shared_ptr<ParticipantManagement::Interface::Dtc> m_ppmDtc;
|
||||
NGL::INGLLogger &m_logger;
|
||||
};
|
||||
} // namespace SituationMap
|
||||
Reference in new issue
Block a user