yosys-master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
RTLIL::SwitchRule Struct Reference

#include <rtlil.h>

+ Collaboration diagram for RTLIL::SwitchRule:

Public Member Functions

 ~SwitchRule ()
 
template<typename T >
void rewrite_sigspecs (T functor)
 
RTLIL::SwitchRuleclone () const
 

Data Fields

RTLIL::SigSpec signal
 
RTLIL_ATTRIBUTE_MEMBERS
std::vector< RTLIL::CaseRule * > 
cases
 

Detailed Description

Definition at line 1130 of file rtlil.h.

Constructor & Destructor Documentation

RTLIL::SwitchRule::~SwitchRule ( )

Definition at line 3121 of file rtlil.cc.

3122 {
3123  for (auto it = cases.begin(); it != cases.end(); it++)
3124  delete *it;
3125 }
RTLIL_ATTRIBUTE_MEMBERS std::vector< RTLIL::CaseRule * > cases
Definition: rtlil.h:1134

Member Function Documentation

RTLIL::SwitchRule * RTLIL::SwitchRule::clone ( ) const

Definition at line 3127 of file rtlil.cc.

3128 {
3129  RTLIL::SwitchRule *new_switchrule = new RTLIL::SwitchRule;
3130  new_switchrule->signal = signal;
3131  new_switchrule->attributes = attributes;
3132  for (auto &it : cases)
3133  new_switchrule->cases.push_back(it->clone());
3134  return new_switchrule;
3135 
3136 }
RTLIL_ATTRIBUTE_MEMBERS std::vector< RTLIL::CaseRule * > cases
Definition: rtlil.h:1134
RTLIL::SigSpec signal
Definition: rtlil.h:1132
template<typename T >
void RTLIL::SwitchRule::rewrite_sigspecs ( functor)

Definition at line 1197 of file rtlil.h.

1198 {
1199  functor(signal);
1200  for (auto it : cases)
1201  it->rewrite_sigspecs(functor);
1202 }
RTLIL_ATTRIBUTE_MEMBERS std::vector< RTLIL::CaseRule * > cases
Definition: rtlil.h:1134
RTLIL::SigSpec signal
Definition: rtlil.h:1132

Field Documentation

RTLIL_ATTRIBUTE_MEMBERS std::vector<RTLIL::CaseRule*> RTLIL::SwitchRule::cases

Definition at line 1134 of file rtlil.h.

RTLIL::SigSpec RTLIL::SwitchRule::signal

Definition at line 1132 of file rtlil.h.


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