Sim: Remove some superfluous class members
This commit is contained in:
parent
4931b80066
commit
6d958c5a3b
|
@ -32,6 +32,7 @@
|
||||||
|
|
||||||
#include <sim/sim_model.h>
|
#include <sim/sim_model.h>
|
||||||
#include <sim/sim_library.h>
|
#include <sim/sim_library.h>
|
||||||
|
#include <sim/sim_library_kibis.h>
|
||||||
#include <sch_symbol.h>
|
#include <sch_symbol.h>
|
||||||
|
|
||||||
|
|
||||||
|
@ -145,9 +146,7 @@ private:
|
||||||
wxPGProperty* m_prevParamGridSelection;
|
wxPGProperty* m_prevParamGridSelection;
|
||||||
bool m_wasCodePreviewUpdated;
|
bool m_wasCodePreviewUpdated;
|
||||||
|
|
||||||
std::shared_ptr<SIM_MODEL> m_currentIbisModel = nullptr;
|
bool isIbisLoaded() { return dynamic_cast<SIM_LIBRARY_KIBIS*>( m_library.get() ); }
|
||||||
|
|
||||||
bool isIbisLoaded() { return m_library->GetType() == SIM_LIBRARY::LIBRARY_TYPE::KIBIS; };
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* DIALOG_SIM_MODEL_H */
|
#endif /* DIALOG_SIM_MODEL_H */
|
||||||
|
|
|
@ -75,10 +75,6 @@ public:
|
||||||
|
|
||||||
std::string GetFilePath() const { return m_filePath; }
|
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:
|
protected:
|
||||||
std::vector<std::string> m_modelNames;
|
std::vector<std::string> m_modelNames;
|
||||||
std::vector<std::unique_ptr<SIM_MODEL>> m_models;
|
std::vector<std::unique_ptr<SIM_MODEL>> m_models;
|
||||||
|
|
|
@ -37,7 +37,7 @@ void SIM_LIBRARY_KIBIS::ReadFile( const std::string& aFilePath, SIM_MODEL::TYPE
|
||||||
|
|
||||||
if( !m_kibis.m_valid )
|
if( !m_kibis.m_valid )
|
||||||
{
|
{
|
||||||
THROW_IO_ERROR( wxString::Format( "Invalid ibis file." ) );
|
THROW_IO_ERROR( wxString::Format( "Invalid ibis file" ) );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -46,11 +46,6 @@ public:
|
||||||
// @copydoc SIM_LIBRARY::WriteFile()
|
// @copydoc SIM_LIBRARY::WriteFile()
|
||||||
void WriteFile( const std::string& aFilePath ) override{};
|
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 );
|
bool InitModel( SIM_MODEL_KIBIS& aModel, wxString aCompName );
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
|
@ -42,11 +42,6 @@ public:
|
||||||
// @copydoc SIM_LIBRARY::WriteFile()
|
// @copydoc SIM_LIBRARY::WriteFile()
|
||||||
void WriteFile( const std::string& aFilePath ) override;
|
void WriteFile( const std::string& aFilePath ) override;
|
||||||
|
|
||||||
virtual SIM_LIBRARY::LIBRARY_TYPE GetType() override
|
|
||||||
{
|
|
||||||
return SIM_LIBRARY::LIBRARY_TYPE::SPICE;
|
|
||||||
};
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::unique_ptr<SPICE_LIBRARY_PARSER> m_spiceLibraryParser;
|
std::unique_ptr<SPICE_LIBRARY_PARSER> m_spiceLibraryParser;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue