KiCad PCB EDA Suite
AM_PARAM_ITEM Class Reference

Class AM_PARAM holds an operand for an AM_PARAM as defined within standard RS274X. More...

#include <class_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

Class AM_PARAM holds 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 220 of file class_am_param.h.

Constructor & Destructor Documentation

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

Definition at line 228 of file class_am_param.h.

229  {
230  m_type = aType;
231  m_dvalue = aValue;
232  m_ivalue = 0;
233  }
parm_item_type m_type
AM_PARAM_ITEM::AM_PARAM_ITEM ( parm_item_type  aType,
int  aValue 
)
inline

Definition at line 235 of file class_am_param.h.

236  {
237  m_type = aType;
238  m_dvalue = 0.0;
239  m_ivalue = aValue;
240  }
parm_item_type m_type

Member Function Documentation

unsigned AM_PARAM_ITEM::GetIndex ( ) const
inline

Definition at line 257 of file class_am_param.h.

References m_ivalue.

Referenced by AM_PARAM::GetValue().

258  {
259  return (unsigned) m_ivalue;
260  }
parm_item_type AM_PARAM_ITEM::GetType ( ) const
inline

Definition at line 252 of file class_am_param.h.

References m_type.

Referenced by AM_PARAM::GetValue().

253  {
254  return m_type;
255  }
parm_item_type m_type
double AM_PARAM_ITEM::GetValue ( ) const
inline

Definition at line 247 of file class_am_param.h.

References m_dvalue.

Referenced by AM_PARAM::GetValue().

248  {
249  return m_dvalue;
250  }
bool AM_PARAM_ITEM::IsDefered ( ) const
inline

Definition at line 271 of file class_am_param.h.

References PUSHPARM.

272  {
273  return m_type == PUSHPARM;
274  }
parm_item_type m_type
bool AM_PARAM_ITEM::IsOperand ( ) const
inline

Definition at line 266 of file class_am_param.h.

References PUSHPARM, and PUSHVALUE.

267  {
268  return m_type == PUSHVALUE || m_type == PUSHPARM;
269  }
parm_item_type m_type
bool AM_PARAM_ITEM::IsOperator ( ) const
inline

Definition at line 262 of file class_am_param.h.

References ADD, DIV, MUL, and SUB.

263  {
264  return m_type == ADD || m_type == SUB || m_type == MUL || m_type == DIV;
265  }
parm_item_type m_type
void AM_PARAM_ITEM::SetValue ( double  aValue)
inline

Definition at line 242 of file class_am_param.h.

243  {
244  m_dvalue = aValue;
245  }

Member Data Documentation

double AM_PARAM_ITEM::m_dvalue
private

Definition at line 224 of file class_am_param.h.

Referenced by GetValue().

int AM_PARAM_ITEM::m_ivalue
private

Definition at line 225 of file class_am_param.h.

Referenced by GetIndex().

parm_item_type AM_PARAM_ITEM::m_type
private

Definition at line 223 of file class_am_param.h.

Referenced by GetType().


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