KiCad PCB EDA Suite
Loading...
Searching...
No Matches
SIM_MODEL_SERIALIZER Class Reference

Serializes/deserializes a SIM_MODEL for storage in LIB_FIELDs/SCH_FIELDs. More...

#include <sim_model_serializer.h>

Inheritance diagram for SIM_MODEL_SERIALIZER:
SIM_MODEL_SOURCE_SERIALIZER

Public Member Functions

virtual ~SIM_MODEL_SERIALIZER ()=default
 
 SIM_MODEL_SERIALIZER (SIM_MODEL &aModel)
 
std::string GenerateDevice () const
 
std::string GenerateDeviceSubtype () const
 
std::string GenerateValue () const
 
std::string GenerateParams () const
 
std::string GeneratePins () const
 
std::string GenerateEnable () const
 
void ParseValue (const std::string &aValue)
 
bool ParseParams (const std::string &aParams)
 
void ParsePins (const std::string &aPins)
 
void ParseEnable (const std::string &aEnable)
 

Static Public Attributes

static constexpr auto REFERENCE_FIELD = "Reference"
 
static constexpr auto VALUE_FIELD = "Value"
 

Protected Member Functions

std::string generateParamValuePair (const SIM_MODEL::PARAM &aParam) const
 

Private Attributes

SIM_MODELm_model
 

Detailed Description

Serializes/deserializes a SIM_MODEL for storage in LIB_FIELDs/SCH_FIELDs.

Definition at line 119 of file sim_model_serializer.h.

Constructor & Destructor Documentation

◆ ~SIM_MODEL_SERIALIZER()

virtual SIM_MODEL_SERIALIZER::~SIM_MODEL_SERIALIZER ( )
virtualdefault

◆ SIM_MODEL_SERIALIZER()

SIM_MODEL_SERIALIZER::SIM_MODEL_SERIALIZER ( SIM_MODEL aModel)
inline

Definition at line 126 of file sim_model_serializer.h.

Member Function Documentation

◆ GenerateDevice()

std::string SIM_MODEL_SERIALIZER::GenerateDevice ( ) const

Definition at line 58 of file sim_model_serializer.cpp.

References SIM_MODEL::GetDeviceInfo(), and m_model.

◆ GenerateDeviceSubtype()

std::string SIM_MODEL_SERIALIZER::GenerateDeviceSubtype ( ) const

Definition at line 64 of file sim_model_serializer.cpp.

References SIM_MODEL::GetTypeInfo(), and m_model.

◆ GenerateEnable()

std::string SIM_MODEL_SERIALIZER::GenerateEnable ( ) const

Definition at line 156 of file sim_model_serializer.cpp.

References SIM_MODEL::IsEnabled(), and m_model.

◆ GenerateParams()

◆ generateParamValuePair()

std::string SIM_MODEL_SERIALIZER::generateParamValuePair ( const SIM_MODEL::PARAM aParam) const
protected

◆ GeneratePins()

std::string SIM_MODEL_SERIALIZER::GeneratePins ( ) const

Definition at line 124 of file sim_model_serializer.cpp.

References SIM_MODEL::GetPins(), m_model, and pin.

Referenced by SIM_MODEL::MigrateSimModel().

◆ GenerateValue()

std::string SIM_MODEL_SERIALIZER::GenerateValue ( ) const

◆ ParseEnable()

void SIM_MODEL_SERIALIZER::ParseEnable ( const std::string &  aEnable)

Definition at line 290 of file sim_model_serializer.cpp.

References m_model, and SIM_MODEL::SetIsEnabled().

◆ ParseParams()

bool SIM_MODEL_SERIALIZER::ParseParams ( const std::string &  aParams)

◆ ParsePins()

void SIM_MODEL_SERIALIZER::ParsePins ( const std::string &  aPins)

◆ ParseValue()

void SIM_MODEL_SERIALIZER::ParseValue ( const std::string &  aValue)

Member Data Documentation

◆ m_model

◆ REFERENCE_FIELD

constexpr auto SIM_MODEL_SERIALIZER::REFERENCE_FIELD = "Reference"
staticconstexpr

Definition at line 122 of file sim_model_serializer.h.

◆ VALUE_FIELD

constexpr auto SIM_MODEL_SERIALIZER::VALUE_FIELD = "Value"
staticconstexpr

Definition at line 123 of file sim_model_serializer.h.


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