LCOV - code coverage report
Current view: top level - source/simulation2/components - ICmpRallyPointRenderer.h (source / functions) Hit Total Coverage
Test: 0 A.D. test coverage report Lines: 1 2 50.0 %
Date: 2023-01-19 00:18:29 Functions: 1 4 25.0 %

          Line data    Source code
       1             : /* Copyright (C) 2018 Wildfire Games.
       2             :  * This file is part of 0 A.D.
       3             :  *
       4             :  * 0 A.D. is free software: you can redistribute it and/or modify
       5             :  * it under the terms of the GNU General Public License as published by
       6             :  * the Free Software Foundation, either version 2 of the License, or
       7             :  * (at your option) any later version.
       8             :  *
       9             :  * 0 A.D. is distributed in the hope that it will be useful,
      10             :  * but WITHOUT ANY WARRANTY; without even the implied warranty of
      11             :  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
      12             :  * GNU General Public License for more details.
      13             :  *
      14             :  * You should have received a copy of the GNU General Public License
      15             :  * along with 0 A.D.  If not, see <http://www.gnu.org/licenses/>.
      16             :  */
      17             : 
      18             : #ifndef INCLUDED_ICMPRALLYPOINTRENDERER
      19             : #define INCLUDED_ICMPRALLYPOINTRENDERER
      20             : 
      21             : #include "maths/FixedVector2D.h"
      22             : #include "simulation2/helpers/Position.h"
      23             : #include "simulation2/system/Interface.h"
      24             : 
      25             : /**
      26             :  * Rally Point.
      27             :  * Holds the position of a unit's rally points, and renders them to screen.
      28             :  */
      29           0 : class ICmpRallyPointRenderer : public IComponent
      30             : {
      31             : public:
      32             : 
      33             :     /// Sets whether the rally point marker and line should be displayed.
      34             :     virtual void SetDisplayed(bool displayed) = 0;
      35             : 
      36             :     /// Sets the position at which the rally point marker should be displayed.
      37             :     /// Discards all previous positions
      38             :     virtual void SetPosition(const CFixedVector2D& position) = 0;
      39             : 
      40             :     /// Updates the position of one given rally point marker.
      41             :     virtual void UpdatePosition(u32 rallyPointId, const CFixedVector2D& position) = 0;
      42             : 
      43             :     /// Add another position at which a marker should be displayed, connected
      44             :     /// to the previous one.
      45             :     virtual void AddPosition_wrapper(const CFixedVector2D& position) = 0;
      46             : 
      47             :     /// Reset the positions of this rally point marker
      48             :     virtual void Reset() = 0;
      49             : 
      50             :     /// Returns true if at least one display rally point is set
      51             :     virtual bool IsSet() const = 0;
      52             : 
      53             :     /// Updates the line color
      54             :     virtual void UpdateColor() = 0;
      55             : 
      56         116 :     DECLARE_INTERFACE_TYPE(RallyPointRenderer)
      57             : };
      58             : 
      59             : #endif // INCLUDED_ICMPRALLYPOINTRENDERER

Generated by: LCOV version 1.13