KiCad PCB EDA Suite
AM_PARAM_ITEM Class Reference

Hold an operand for an AM_PARAM as defined within standard RS274X. More...

#include <am_param.h>

Public Member Functions

 AM_PARAM_ITEM (parm_item_type aType, double aValue)
 
 AM_PARAM_ITEM (parm_item_type aType, int aValue)
 
void SetValue (double aValue)
 
double GetValue () const
 
parm_item_type GetType () const
 
unsigned GetIndex () const
 
bool IsOperator () const
 
bool IsOperand () const
 
bool IsDefered () const
 

Private Attributes

parm_item_type m_type
 
double m_dvalue
 
int m_ivalue
 

Detailed Description

Hold an operand for an AM_PARAM as defined within standard RS274X.

The value field can be a constant, i.e. "immediate" parameter or it may not be used if this param is going to defer to the referencing aperture macro. In that case, the index field is an index into the aperture macro's parameters.

Definition at line 219 of file am_param.h.

Constructor & Destructor Documentation

◆ AM_PARAM_ITEM() [1/2]

AM_PARAM_ITEM::AM_PARAM_ITEM ( parm_item_type  aType,
double  aValue 
)
inline

Definition at line 222 of file am_param.h.

223  {
224  m_type = aType;
225  m_dvalue = aValue;
226  m_ivalue = 0;
227  }
double m_dvalue
Definition: am_param.h:272
parm_item_type m_type
Definition: am_param.h:271

References m_dvalue, m_ivalue, and m_type.

◆ AM_PARAM_ITEM() [2/2]

AM_PARAM_ITEM::AM_PARAM_ITEM ( parm_item_type  aType,
int  aValue 
)
inline

Definition at line 229 of file am_param.h.

230  {
231  m_type = aType;
232  m_dvalue = 0.0;
233  m_ivalue = aValue;
234  }
double m_dvalue
Definition: am_param.h:272
parm_item_type m_type
Definition: am_param.h:271

References m_dvalue, m_ivalue, and m_type.

Member Function Documentation

◆ GetIndex()

unsigned AM_PARAM_ITEM::GetIndex ( ) const
inline

Definition at line 251 of file am_param.h.

252  {
253  return (unsigned) m_ivalue;
254  }

References m_ivalue.

Referenced by AM_PARAM::GetValue().

◆ GetType()

parm_item_type AM_PARAM_ITEM::GetType ( ) const
inline

Definition at line 246 of file am_param.h.

247  {
248  return m_type;
249  }
parm_item_type m_type
Definition: am_param.h:271

References m_type.

Referenced by AM_PARAM::GetValue().

◆ GetValue()

double AM_PARAM_ITEM::GetValue ( ) const
inline

Definition at line 241 of file am_param.h.

242  {
243  return m_dvalue;
244  }
double m_dvalue
Definition: am_param.h:272

References m_dvalue.

Referenced by AM_PARAM::GetValue().

◆ IsDefered()

bool AM_PARAM_ITEM::IsDefered ( ) const
inline

Definition at line 265 of file am_param.h.

266  {
267  return m_type == PUSHPARM;
268  }
parm_item_type m_type
Definition: am_param.h:271

References m_type, and PUSHPARM.

◆ IsOperand()

bool AM_PARAM_ITEM::IsOperand ( ) const
inline

Definition at line 260 of file am_param.h.

261  {
262  return m_type == PUSHVALUE || m_type == PUSHPARM;
263  }
parm_item_type m_type
Definition: am_param.h:271

References m_type, PUSHPARM, and PUSHVALUE.

◆ IsOperator()

bool AM_PARAM_ITEM::IsOperator ( ) const
inline

Definition at line 256 of file am_param.h.

257  {
258  return m_type == ADD || m_type == SUB || m_type == MUL || m_type == DIV;
259  }
parm_item_type m_type
Definition: am_param.h:271

References ADD, DIV, m_type, MUL, and SUB.

◆ SetValue()

void AM_PARAM_ITEM::SetValue ( double  aValue)
inline

Definition at line 236 of file am_param.h.

237  {
238  m_dvalue = aValue;
239  }
double m_dvalue
Definition: am_param.h:272

References m_dvalue.

Member Data Documentation

◆ m_dvalue

double AM_PARAM_ITEM::m_dvalue
private

Definition at line 272 of file am_param.h.

Referenced by AM_PARAM_ITEM(), GetValue(), and SetValue().

◆ m_ivalue

int AM_PARAM_ITEM::m_ivalue
private

Definition at line 273 of file am_param.h.

Referenced by AM_PARAM_ITEM(), and GetIndex().

◆ m_type

parm_item_type AM_PARAM_ITEM::m_type
private

Definition at line 271 of file am_param.h.

Referenced by AM_PARAM_ITEM(), GetType(), IsDefered(), IsOperand(), and IsOperator().


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