KiCad PCB EDA Suite
PREDEF_TIMESTAMPER Class Reference

Timestamper that returns predefined values from a vector. More...

Inheritance diagram for PREDEF_TIMESTAMPER:
KIGFX::ACCELERATING_ZOOM_CONTROLLER::TIMESTAMP_PROVIDER

Public Types

using STAMP_LIST = std::vector< int >
 

Public Member Functions

 PREDEF_TIMESTAMPER (const STAMP_LIST &aStamps)
 
ACCELERATING_ZOOM_CONTROLLER::TIME_PT GetTimestamp () override
 

Public Attributes

const STAMP_LIST m_stamps
 
STAMP_LIST::const_iterator m_iter
 

Detailed Description

Timestamper that returns predefined values from a vector.

Definition at line 83 of file test_zoom_controller.cpp.

Member Typedef Documentation

◆ STAMP_LIST

using PREDEF_TIMESTAMPER::STAMP_LIST = std::vector<int>

Definition at line 86 of file test_zoom_controller.cpp.

Constructor & Destructor Documentation

◆ PREDEF_TIMESTAMPER()

PREDEF_TIMESTAMPER::PREDEF_TIMESTAMPER ( const STAMP_LIST aStamps)
inline

Definition at line 88 of file test_zoom_controller.cpp.

89 : m_stamps( aStamps ), m_iter( m_stamps.begin() )
90 {
91 }
STAMP_LIST::const_iterator m_iter

Member Function Documentation

◆ GetTimestamp()

ACCELERATING_ZOOM_CONTROLLER::TIME_PT PREDEF_TIMESTAMPER::GetTimestamp ( )
inlineoverridevirtual
Returns
the next time point in the predefined sequence

Implements KIGFX::ACCELERATING_ZOOM_CONTROLLER::TIMESTAMP_PROVIDER.

Definition at line 96 of file test_zoom_controller.cpp.

97 {
98 // Don't ask for more samples than given
99 BOOST_REQUIRE( m_iter != m_stamps.end() );
100
101 return ACCELERATING_ZOOM_CONTROLLER::TIME_PT( std::chrono::milliseconds( *m_iter++ ) );
102 }
std::chrono::time_point< CLOCK > TIME_PT

References m_iter, and m_stamps.

Member Data Documentation

◆ m_iter

STAMP_LIST::const_iterator PREDEF_TIMESTAMPER::m_iter

Definition at line 105 of file test_zoom_controller.cpp.

Referenced by GetTimestamp().

◆ m_stamps

const STAMP_LIST PREDEF_TIMESTAMPER::m_stamps

Definition at line 104 of file test_zoom_controller.cpp.

Referenced by GetTimestamp().


The documentation for this class was generated from the following file: