Sim: Remove some superfluous class members

This commit is contained in:
Mikolaj Wielgus 2022-10-10 13:49:43 +02:00
parent 4931b80066
commit 6d958c5a3b
5 changed files with 3 additions and 18 deletions

View File

@ -32,6 +32,7 @@
#include <sim/sim_model.h>
#include <sim/sim_library.h>
#include <sim/sim_library_kibis.h>
#include <sch_symbol.h>
@ -145,9 +146,7 @@ private:
wxPGProperty* m_prevParamGridSelection;
bool m_wasCodePreviewUpdated;
std::shared_ptr<SIM_MODEL> m_currentIbisModel = nullptr;
bool isIbisLoaded() { return m_library->GetType() == SIM_LIBRARY::LIBRARY_TYPE::KIBIS; };
bool isIbisLoaded() { return dynamic_cast<SIM_LIBRARY_KIBIS*>( m_library.get() ); }
};
#endif /* DIALOG_SIM_MODEL_H */

View File

@ -75,10 +75,6 @@ public:
std::string GetFilePath() const { return m_filePath; }
DEFINE_ENUM_CLASS_WITH_ITERATOR( LIBRARY_TYPE, NONE, KIBIS, SPICE )
virtual SIM_LIBRARY::LIBRARY_TYPE GetType() { return SIM_LIBRARY::LIBRARY_TYPE::NONE; };
protected:
std::vector<std::string> m_modelNames;
std::vector<std::unique_ptr<SIM_MODEL>> m_models;

View File

@ -37,7 +37,7 @@ void SIM_LIBRARY_KIBIS::ReadFile( const std::string& aFilePath, SIM_MODEL::TYPE
if( !m_kibis.m_valid )
{
THROW_IO_ERROR( wxString::Format( "Invalid ibis file." ) );
THROW_IO_ERROR( wxString::Format( "Invalid ibis file" ) );
return;
}

View File

@ -46,11 +46,6 @@ public:
// @copydoc SIM_LIBRARY::WriteFile()
void WriteFile( const std::string& aFilePath ) override{};
virtual SIM_LIBRARY::LIBRARY_TYPE GetType() override
{
return SIM_LIBRARY::LIBRARY_TYPE::KIBIS;
};
bool InitModel( SIM_MODEL_KIBIS& aModel, wxString aCompName );
protected:

View File

@ -42,11 +42,6 @@ public:
// @copydoc SIM_LIBRARY::WriteFile()
void WriteFile( const std::string& aFilePath ) override;
virtual SIM_LIBRARY::LIBRARY_TYPE GetType() override
{
return SIM_LIBRARY::LIBRARY_TYPE::SPICE;
};
private:
std::unique_ptr<SPICE_LIBRARY_PARSER> m_spiceLibraryParser;
};