Sim: Add tuner param virtual getter
This commit is contained in:
parent
d14de1ce78
commit
78b193af5f
|
@ -582,6 +582,8 @@ public:
|
|||
int GetParamCount() const { return static_cast<int>( m_params.size() ); }
|
||||
virtual const PARAM& GetParam( unsigned aParamIndex ) const; // Return base parameter unless it's overridden.
|
||||
|
||||
virtual const PARAM* GetTunerParam() const { return nullptr; }
|
||||
|
||||
const PARAM* FindParam( const std::string& aParamName ) const;
|
||||
|
||||
std::vector<std::reference_wrapper<const PARAM>> GetParams() const;
|
||||
|
|
|
@ -47,6 +47,8 @@ public:
|
|||
void WriteDataSchFields( std::vector<SCH_FIELD>& aFields ) const override;
|
||||
void WriteDataLibFields( std::vector<LIB_FIELD>& aFields ) const override;
|
||||
|
||||
const PARAM* GetTunerParam() const override { return &GetParam( 0 ); }
|
||||
|
||||
private:
|
||||
template <typename T>
|
||||
void inferredWriteDataFields( std::vector<T>& aFields ) const;
|
||||
|
|
|
@ -46,6 +46,8 @@ public:
|
|||
void WriteDataSchFields( std::vector<SCH_FIELD>& aFields ) const override;
|
||||
void WriteDataLibFields( std::vector<LIB_FIELD>& aFields ) const override;
|
||||
|
||||
const PARAM* GetTunerParam() const override { return FindParam( "pos" ); }
|
||||
|
||||
private:
|
||||
template <typename T>
|
||||
void inferredWriteDataFields( std::vector<T>& aFields ) const;
|
||||
|
|
Loading…
Reference in New Issue