component.hpp

来自「gspiceui电子CAD仿真程序.用于电路参数模拟仿真」· HPP 代码 · 共 104 行

HPP
104
字号
//*****************************************************************************//                                Component.hpp                               *//                               ---------------                              *//  Description : This class processes a component definition line from a net *//                list. The line is parsed into it's constituant parts.       *//  Started     : 14/05/2004                                                  *//  Last Update : 08/06/2005                                                  *//  Copyright   : (C) 2004 by M.S.Waters                                      *//  Email       : M.Waters@bom.gov.au                                         *//*****************************************************************************//*****************************************************************************//                                                                            *//    This program is free software; you can redistribute it and/or modify    *//    it under the terms of the GNU General Public License as published by    *//    the Free Software Foundation; either version 2 of the License, or       *//    (at your option) any later version.                                     *//                                                                            *//*****************************************************************************#ifndef COMPONENT_HPP#define COMPONENT_HPP// System Includes#include <iostream>// wxWindows Includes#include <wx/wx.h>#include <wx/tokenzr.h>// Application Includes// Local Constant Declarations//*****************************************************************************class Component{  public:    enum  eTypeCpnt    {      eCPNT_NONE = 0, // None type selected      eCPNT_CAP,      // Capacitor      eCPNT_RES,      // Resistor      eCPNT_ADM,      // Admittance      eCPNT_IND,      // Inductor      eCPNT_DIODE,    // Diode      eCPNT_BJT,      // Bipolar Junction Transistor      eCPNT_JFET,     // Junction Field-Effect Transistor      eCPNT_MOS,      // Metal-Oxide Semiconductor Field-Effect Transistor      eCPNT_VCVS,     // Voltage Controlled Voltage Source      eCPNT_CCCS,     // Current Controlled Current Source      eCPNT_VCCS,     // Voltage Controlled Current Source      eCPNT_CCVS,     // Current Controlled Voltage Source      eCPNT_CIND,     // Coupled (Mutual) Inductors      eCPNT_TLINE,    // Transmission Line      eCPNT_LOGIC,    // Logic Device      eCPNT_ICS,      // Independent Current Source      eCPNT_IVS,      // Independent Voltage Source      eCPNT_CCSW,     // Current Controlled Switch      eCPNT_VCSW,     // Voltage Controlled Switch      eCPNT_SUBCKT    // Sub-Circuit    };  private:    wxString       m_osLine;    wxString       m_osName;    wxArrayString  m_oasNodes;    wxString       m_osValue;    eTypeCpnt      m_eType;//  wxArrayString  m_oasPorts;  ??? 15/05/2004//  int            m_iPolarity; ??? 15/05/2004    bool           m_bIsOk;    bool  bParse( const wxChar * psLine );  public:    Component( const wxChar * psLine=NULL );    ~Component( );    void  Clear( void );    bool  bIsOk( void ) { return( m_bIsOk ); }    bool  bSetLine( const wxChar * psLine );    const wxString      &  rosGetLine ( void ) { return( m_osLine   ); }    const wxString      &  rosGetName ( void ) { return( m_osName   ); }    const wxArrayString & roasGetNodes( void ) { return( m_oasNodes ); }    const wxString      &  rosGetValue( void ) { return( m_osValue  ); }    eTypeCpnt                eGetType ( void ) { return( m_eType    ); }};//*****************************************************************************#endif // COMPONENT_HPP

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?