1
0
forked from 0ad/0ad

Adds final keyword to simulation component classes.

Differential Revision: https://code.wildfiregames.com/D4520
This was SVN commit r26537.
This commit is contained in:
Vladislav Belov 2022-03-03 22:42:26 +00:00
parent d494bbd583
commit 3eee3a444d
30 changed files with 78 additions and 78 deletions

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2021 Wildfire Games.
/* Copyright (C) 2022 Wildfire Games.
* This file is part of 0 A.D.
*
* 0 A.D. is free software: you can redistribute it and/or modify
@ -41,7 +41,7 @@
class SceneCollector;
class CFrustum;
class CMessageTurnStart : public CMessage
class CMessageTurnStart final : public CMessage
{
public:
DEFAULT_MESSAGE_IMPL(TurnStart)
@ -58,7 +58,7 @@ public:
/**
* Generic per-turn update message, for things that don't care much about ordering.
*/
class CMessageUpdate : public CMessage
class CMessageUpdate final : public CMessage
{
public:
DEFAULT_MESSAGE_IMPL(Update)
@ -75,7 +75,7 @@ public:
* Update phase for formation controller movement (must happen before individual
* units move to follow their formation).
*/
class CMessageUpdate_MotionFormation : public CMessage
class CMessageUpdate_MotionFormation final : public CMessage
{
public:
DEFAULT_MESSAGE_IMPL(Update_MotionFormation)
@ -91,7 +91,7 @@ public:
/**
* Update phase for non-formation-controller unit movement.
*/
class CMessageUpdate_MotionUnit : public CMessage
class CMessageUpdate_MotionUnit final : public CMessage
{
public:
DEFAULT_MESSAGE_IMPL(Update_MotionUnit)
@ -107,7 +107,7 @@ public:
/**
* Final update phase, after all other updates.
*/
class CMessageUpdate_Final : public CMessage
class CMessageUpdate_Final final : public CMessage
{
public:
DEFAULT_MESSAGE_IMPL(Update_Final)
@ -123,7 +123,7 @@ public:
/**
* Prepare for rendering a new frame (set up model positions etc).
*/
class CMessageInterpolate : public CMessage
class CMessageInterpolate final : public CMessage
{
public:
DEFAULT_MESSAGE_IMPL(Interpolate)
@ -146,7 +146,7 @@ public:
* Add renderable objects to the scene collector.
* Called after CMessageInterpolate.
*/
class CMessageRenderSubmit : public CMessage
class CMessageRenderSubmit final : public CMessage
{
public:
DEFAULT_MESSAGE_IMPL(RenderSubmit)
@ -172,7 +172,7 @@ public:
* In some situations these messages will never be sent - components must ensure they
* load all their data themselves before using it in that case.
*/
class CMessageProgressiveLoad : public CMessage
class CMessageProgressiveLoad final : public CMessage
{
public:
DEFAULT_MESSAGE_IMPL(ProgressiveLoad)
@ -195,7 +195,7 @@ public:
* in the deserialization process, may be done in response to this message
* instead.
*/
class CMessageDeserialized : public CMessage
class CMessageDeserialized final : public CMessage
{
public:
DEFAULT_MESSAGE_IMPL(Deserialized)
@ -210,7 +210,7 @@ public:
* This is sent immediately after a new entity's components have all been created
* and initialised.
*/
class CMessageCreate : public CMessage
class CMessageCreate final : public CMessage
{
public:
DEFAULT_MESSAGE_IMPL(Create)
@ -230,7 +230,7 @@ public:
* It's possible for this message to be sent multiple times for one entity, but all its components
* will have been deleted after the first time.
*/
class CMessageDestroy : public CMessage
class CMessageDestroy final : public CMessage
{
public:
DEFAULT_MESSAGE_IMPL(Destroy)
@ -243,7 +243,7 @@ public:
entity_id_t entity;
};
class CMessageOwnershipChanged : public CMessage
class CMessageOwnershipChanged final : public CMessage
{
public:
DEFAULT_MESSAGE_IMPL(OwnershipChanged)
@ -265,7 +265,7 @@ public:
* If @c inWorld is false, then the other fields are invalid and meaningless.
* Otherwise they represent the current position.
*/
class CMessagePositionChanged : public CMessage
class CMessagePositionChanged final : public CMessage
{
public:
DEFAULT_MESSAGE_IMPL(PositionChanged)
@ -285,7 +285,7 @@ public:
* Sent by CCmpPosition whenever anything has changed that will affect the
* return value of GetInterpolatedTransform()
*/
class CMessageInterpolatedPositionChanged : public CMessage
class CMessageInterpolatedPositionChanged final : public CMessage
{
public:
DEFAULT_MESSAGE_IMPL(InterpolatedPositionChanged)
@ -302,7 +302,7 @@ public:
};
/*Sent whenever the territory type (neutral,own,enemy) differs from the former type*/
class CMessageTerritoryPositionChanged : public CMessage
class CMessageTerritoryPositionChanged final : public CMessage
{
public:
DEFAULT_MESSAGE_IMPL(TerritoryPositionChanged)
@ -319,7 +319,7 @@ public:
/**
* Sent by CCmpUnitMotion during Update if an event happened that might interest other components.
*/
class CMessageMotionUpdate : public CMessage
class CMessageMotionUpdate final : public CMessage
{
public:
DEFAULT_MESSAGE_IMPL(MotionUpdate)
@ -344,7 +344,7 @@ public:
/**
* Sent when water height has been changed.
*/
class CMessageWaterChanged : public CMessage
class CMessageWaterChanged final : public CMessage
{
public:
DEFAULT_MESSAGE_IMPL(WaterChanged)
@ -357,7 +357,7 @@ public:
/**
* Sent when terrain (texture or elevation) has been changed.
*/
class CMessageTerrainChanged : public CMessage
class CMessageTerrainChanged final : public CMessage
{
public:
DEFAULT_MESSAGE_IMPL(TerrainChanged)
@ -373,7 +373,7 @@ public:
/**
* Sent, at most once per turn, when the visibility of an entity changed
*/
class CMessageVisibilityChanged : public CMessage
class CMessageVisibilityChanged final : public CMessage
{
public:
DEFAULT_MESSAGE_IMPL(VisibilityChanged)
@ -393,7 +393,7 @@ public:
* Sent when then obstruction of an entity has changed in a manner
* that changes 'block movement' properties.
*/
class CMessageMovementObstructionChanged : public CMessage
class CMessageMovementObstructionChanged final : public CMessage
{
public:
DEFAULT_MESSAGE_IMPL(MovementObstructionChanged)
@ -407,7 +407,7 @@ public:
* Sent when ObstructionManager's view of the shape of the world has changed
* (changing the TILE_OUTOFBOUNDS tiles returned by Rasterise).
*/
class CMessageObstructionMapShapeChanged : public CMessage
class CMessageObstructionMapShapeChanged final : public CMessage
{
public:
DEFAULT_MESSAGE_IMPL(ObstructionMapShapeChanged)
@ -420,7 +420,7 @@ public:
/**
* Sent when territory assignments have changed.
*/
class CMessageTerritoriesChanged : public CMessage
class CMessageTerritoriesChanged final : public CMessage
{
public:
DEFAULT_MESSAGE_IMPL(TerritoriesChanged)
@ -434,7 +434,7 @@ public:
* Sent by CCmpRangeManager at most once per turn, when an active range query
* has had matching units enter/leave the range since the last RangeUpdate.
*/
class CMessageRangeUpdate : public CMessage
class CMessageRangeUpdate final : public CMessage
{
public:
DEFAULT_MESSAGE_IMPL(RangeUpdate)
@ -476,7 +476,7 @@ public:
/**
* Sent by CCmpPathfinder after async path requests.
*/
class CMessagePathResult : public CMessage
class CMessagePathResult final : public CMessage
{
public:
DEFAULT_MESSAGE_IMPL(PathResult)
@ -493,7 +493,7 @@ public:
/**
* Sent by aura manager when a value of a certain entity's component is changed
*/
class CMessageValueModification : public CMessage
class CMessageValueModification final : public CMessage
{
public:
DEFAULT_MESSAGE_IMPL(ValueModification)
@ -513,7 +513,7 @@ public:
/**
* Sent by atlas if the playercolor has been changed.
*/
class CMessagePlayerColorChanged : public CMessage
class CMessagePlayerColorChanged final : public CMessage
{
public:
DEFAULT_MESSAGE_IMPL(PlayerColorChanged)
@ -529,7 +529,7 @@ public:
/**
* Sent by aura and tech managers when a value of a certain template's component is changed
*/
class CMessageTemplateModification : public CMessage
class CMessageTemplateModification final : public CMessage
{
public:
DEFAULT_MESSAGE_IMPL(TemplateModification)
@ -549,7 +549,7 @@ public:
/**
* Sent by CCmpVision when an entity's vision range changes.
*/
class CMessageVisionRangeChanged : public CMessage
class CMessageVisionRangeChanged final : public CMessage
{
public:
DEFAULT_MESSAGE_IMPL(VisionRangeChanged)
@ -567,7 +567,7 @@ public:
/**
* Sent by CCmpVision when an entity's vision sharing changes.
*/
class CMessageVisionSharingChanged : public CMessage
class CMessageVisionSharingChanged final : public CMessage
{
public:
DEFAULT_MESSAGE_IMPL(VisionSharingChanged)
@ -585,7 +585,7 @@ public:
/**
* Sent when an entity pings the minimap
*/
class CMessageMinimapPing : public CMessage
class CMessageMinimapPing final : public CMessage
{
public:
DEFAULT_MESSAGE_IMPL(MinimapPing)
@ -599,7 +599,7 @@ public:
* Cinematics events
*/
class CMessageCinemaPathEnded : public CMessage
class CMessageCinemaPathEnded final : public CMessage
{
public:
DEFAULT_MESSAGE_IMPL(CinemaPathEnded)
@ -612,7 +612,7 @@ public:
CStrW name;
};
class CMessageCinemaQueueEnded : public CMessage
class CMessageCinemaQueueEnded final : public CMessage
{
public:
DEFAULT_MESSAGE_IMPL(CinemaQueueEnded)

View File

@ -867,7 +867,7 @@ private:
/**
* Implementation of ICmpAIManager.
*/
class CCmpAIManager : public ICmpAIManager
class CCmpAIManager final : public ICmpAIManager
{
public:
static void ClassInit(CComponentManager& UNUSED(componentManager))

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2020 Wildfire Games.
/* Copyright (C) 2022 Wildfire Games.
* This file is part of 0 A.D.
*
* 0 A.D. is free software: you can redistribute it and/or modify
@ -29,7 +29,7 @@
#include "simulation2/Simulation2.h"
class CCmpCinemaManager : public ICmpCinemaManager
class CCmpCinemaManager final : public ICmpCinemaManager
{
public:
static void ClassInit(CComponentManager& componentManager)

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2021 Wildfire Games.
/* Copyright (C) 2022 Wildfire Games.
* This file is part of 0 A.D.
*
* 0 A.D. is free software: you can redistribute it and/or modify
@ -27,7 +27,7 @@
#include "scriptinterface/JSON.h"
#include "simulation2/system/TurnManager.h"
class CCmpCommandQueue : public ICmpCommandQueue
class CCmpCommandQueue final : public ICmpCommandQueue
{
public:
static void ClassInit(CComponentManager& UNUSED(componentManager))

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2015 Wildfire Games.
/* Copyright (C) 2022 Wildfire Games.
* This file is part of 0 A.D.
*
* 0 A.D. is free software: you can redistribute it and/or modify
@ -44,7 +44,7 @@
*
* Must not be used on network-synchronised entities, unless \<Inactive\> is present.
*/
class CCmpDecay : public ICmpDecay
class CCmpDecay final : public ICmpDecay
{
public:
static void ClassInit(CComponentManager& UNUSED(componentManager))

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2020 Wildfire Games.
/* Copyright (C) 2022 Wildfire Games.
* This file is part of 0 A.D.
*
* 0 A.D. is free software: you can redistribute it and/or modify
@ -31,7 +31,7 @@
#include "simulation2/MessageTypes.h"
#include "maths/FixedVector2D.h"
class CCmpFootprint : public ICmpFootprint
class CCmpFootprint final : public ICmpFootprint
{
public:
static void ClassInit(CComponentManager& UNUSED(componentManager))

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2019 Wildfire Games.
/* Copyright (C) 2022 Wildfire Games.
* This file is part of 0 A.D.
*
* 0 A.D. is free software: you can redistribute it and/or modify
@ -27,7 +27,7 @@
#include "graphics/Color.h"
class CCmpMinimap : public ICmpMinimap
class CCmpMinimap final : public ICmpMinimap
{
public:
static void ClassInit(CComponentManager& componentManager)

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2012 Wildfire Games.
/* Copyright (C) 2022 Wildfire Games.
* This file is part of 0 A.D.
*
* 0 A.D. is free software: you can redistribute it and/or modify
@ -25,7 +25,7 @@
#include "graphics/Terrain.h"
class CCmpMotionBall : public ICmpMotion
class CCmpMotionBall final : public ICmpMotion
{
public:
static void ClassInit(CComponentManager& componentManager)

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2021 Wildfire Games.
/* Copyright (C) 2022 Wildfire Games.
* This file is part of 0 A.D.
*
* 0 A.D. is free software: you can redistribute it and/or modify
@ -43,7 +43,7 @@ struct SerializeHelper<ICmpObstructionManager::tag_t>
* Obstruction implementation. This keeps the ICmpPathfinder's model of the world updated when the
* entities move and die, with shapes derived from ICmpFootprint.
*/
class CCmpObstruction : public ICmpObstruction
class CCmpObstruction final : public ICmpObstruction
{
public:
static void ClassInit(CComponentManager& componentManager)

View File

@ -123,7 +123,7 @@ struct SerializeHelper<StaticShape>
}
};
class CCmpObstructionManager : public ICmpObstructionManager
class CCmpObstructionManager final : public ICmpObstructionManager
{
public:
static void ClassInit(CComponentManager& componentManager)

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2017 Wildfire Games.
/* Copyright (C) 2022 Wildfire Games.
* This file is part of 0 A.D.
*
* 0 A.D. is free software: you can redistribute it and/or modify
@ -30,7 +30,7 @@
#include "ps/CLogger.h"
#include "ps/Profile.h"
class CCmpOverlayRenderer : public ICmpOverlayRenderer
class CCmpOverlayRenderer final : public ICmpOverlayRenderer
{
public:
static void ClassInit(CComponentManager& UNUSED(componentManager))

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2017 Wildfire Games.
/* Copyright (C) 2022 Wildfire Games.
* This file is part of 0 A.D.
*
* 0 A.D. is free software: you can redistribute it and/or modify
@ -25,7 +25,7 @@
/**
* Basic ICmpOwnership implementation.
*/
class CCmpOwnership : public ICmpOwnership
class CCmpOwnership final : public ICmpOwnership
{
public:
static void ClassInit(CComponentManager& componentManager)

View File

@ -25,7 +25,7 @@
#include "renderer/SceneRenderer.h"
#include "simulation2/MessageTypes.h"
class CCmpParticleManager : public ICmpParticleManager
class CCmpParticleManager final : public ICmpParticleManager
{
public:
static void ClassInit(CComponentManager& componentManager)

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2021 Wildfire Games.
/* Copyright (C) 2022 Wildfire Games.
* This file is part of 0 A.D.
*
* 0 A.D. is free software: you can redistribute it and/or modify
@ -40,7 +40,7 @@
/**
* Basic ICmpPosition implementation.
*/
class CCmpPosition : public ICmpPosition
class CCmpPosition final : public ICmpPosition
{
public:
static void ClassInit(CComponentManager& componentManager)

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2021 Wildfire Games.
/* Copyright (C) 2022 Wildfire Games.
* This file is part of 0 A.D.
*
* 0 A.D. is free software: you can redistribute it and/or modify
@ -41,7 +41,7 @@
// Time (in seconds) before projectiles that stuck in the ground are destroyed
const static float PROJECTILE_DECAY_TIME = 30.f;
class CCmpProjectileManager : public ICmpProjectileManager
class CCmpProjectileManager final : public ICmpProjectileManager
{
public:
static void ClassInit(CComponentManager& componentManager)

View File

@ -66,7 +66,7 @@ struct SVisibilitySegment
}
};
class CCmpRallyPointRenderer : public ICmpRallyPointRenderer
class CCmpRallyPointRenderer final : public ICmpRallyPointRenderer
{
public:
static std::string GetSchema();

View File

@ -349,7 +349,7 @@ struct SerializeHelper<EntityData>
* (TODO: would be nice to make it cleverer, so e.g. mountains and walls
* can block vision)
*/
class CCmpRangeManager : public ICmpRangeManager
class CCmpRangeManager final : public ICmpRangeManager
{
public:
static void ClassInit(CComponentManager& componentManager)

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2020 Wildfire Games.
/* Copyright (C) 2022 Wildfire Games.
* This file is part of 0 A.D.
*
* 0 A.D. is free software: you can redistribute it and/or modify
@ -32,7 +32,7 @@
#include <memory>
class CCmpRangeOverlayRenderer : public ICmpRangeOverlayRenderer
class CCmpRangeOverlayRenderer final : public ICmpRangeOverlayRenderer
{
public:
static void ClassInit(CComponentManager& componentManager)

View File

@ -50,7 +50,7 @@ static const float MIN_ALPHA_UNSELECTED = 0.0f;
// Desaturation value for unselected, always visible overlays (0.33 = 33% desaturated or 66% of original saturation)
static const float RGB_DESATURATION = 0.333333f;
class CCmpSelectable : public ICmpSelectable
class CCmpSelectable final : public ICmpSelectable
{
public:
enum EShape

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2020 Wildfire Games.
/* Copyright (C) 2022 Wildfire Games.
* This file is part of 0 A.D.
*
* 0 A.D. is free software: you can redistribute it and/or modify
@ -27,7 +27,7 @@
#include "soundmanager/ISoundManager.h"
class CCmpSoundManager : public ICmpSoundManager
class CCmpSoundManager final : public ICmpSoundManager
{
public:
static void ClassInit(CComponentManager& UNUSED(componentManager) )

View File

@ -28,7 +28,7 @@
#include "ps/TemplateLoader.h"
#include "ps/XML/RelaxNG.h"
class CCmpTemplateManager : public ICmpTemplateManager
class CCmpTemplateManager final : public ICmpTemplateManager
{
public:
static void ClassInit(CComponentManager& componentManager)

View File

@ -29,7 +29,7 @@
#include "simulation2/components/ICmpRangeManager.h"
#include "simulation2/MessageTypes.h"
class CCmpTerrain : public ICmpTerrain
class CCmpTerrain final : public ICmpTerrain
{
public:
static void ClassInit(CComponentManager& UNUSED(componentManager))

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2020 Wildfire Games.
/* Copyright (C) 2022 Wildfire Games.
* This file is part of 0 A.D.
*
* 0 A.D. is free software: you can redistribute it and/or modify
@ -24,7 +24,7 @@
#include "simulation2/components/ICmpPlayerManager.h"
#include "simulation2/components/ICmpValueModificationManager.h"
class CCmpTerritoryInfluence : public ICmpTerritoryInfluence
class CCmpTerritoryInfluence final : public ICmpTerritoryInfluence
{
public:
static void ClassInit(CComponentManager& UNUSED(componentManager))

View File

@ -45,7 +45,7 @@
class CCmpTerritoryManager;
class TerritoryOverlay : public TerrainTextureOverlay
class TerritoryOverlay final : public TerrainTextureOverlay
{
NONCOPYABLE(TerritoryOverlay);
public:

View File

@ -28,7 +28,7 @@
class CCmpUnitMotion;
class CCmpUnitMotionManager : public ICmpUnitMotionManager
class CCmpUnitMotionManager final : public ICmpUnitMotionManager
{
public:
static void ClassInit(CComponentManager& componentManager);

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2020 Wildfire Games.
/* Copyright (C) 2022 Wildfire Games.
* This file is part of 0 A.D.
*
* 0 A.D. is free software: you can redistribute it and/or modify
@ -61,7 +61,7 @@
* interpolated position and terrain. So we store a bounding sphere, which
* is rotation-independent, instead of a bounding box.
*/
class CCmpUnitRenderer : public ICmpUnitRenderer
class CCmpUnitRenderer final : public ICmpUnitRenderer
{
public:
struct SUnit

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2017 Wildfire Games.
/* Copyright (C) 2022 Wildfire Games.
* This file is part of 0 A.D.
*
* 0 A.D. is free software: you can redistribute it and/or modify
@ -25,7 +25,7 @@
#include "simulation2/components/ICmpRangeManager.h"
#include "simulation2/components/ICmpValueModificationManager.h"
class CCmpVision : public ICmpVision
class CCmpVision final : public ICmpVision
{
public:
static void ClassInit(CComponentManager& componentManager)

View File

@ -51,7 +51,7 @@
#include "ps/GameSetup/Config.h"
#include "renderer/Scene.h"
class CCmpVisualActor : public ICmpVisual
class CCmpVisualActor final : public ICmpVisual
{
public:
static void ClassInit(CComponentManager& componentManager)

View File

@ -28,7 +28,7 @@
#include "simulation2/MessageTypes.h"
#include "tools/atlas/GameInterface/GameLoop.h"
class CCmpWaterManager : public ICmpWaterManager
class CCmpWaterManager final : public ICmpWaterManager
{
public:
static void ClassInit(CComponentManager& componentManager)

View File

@ -35,7 +35,7 @@
/**
* Used for script-only message types.
*/
class CMessageScripted : public CMessage
class CMessageScripted final : public CMessage
{
public:
virtual int GetType() const { return mtid; }