HAL
hal::StateComponentEntry Class Reference

Utility class that represents a state of the StateComponent. More...

#include <boolean_function_table_model.h>

Inheritance diagram for hal::StateComponentEntry:
Inheritance graph
Collaboration diagram for hal::StateComponentEntry:
Collaboration graph

Public Types

enum  StateCompType { PosState = 0 , NegState = 1 }
 
- Public Types inherited from hal::BooleanFunctionTableEntry
enum class  EntryType {
  BooleanFunctionStandard , CPBehavior , StateComp , FFComp ,
  LatchComp
}
 

Public Member Functions

 StateComponentEntry (u32 gateId, StateCompType type, QString stateVal)
 
QString getPythonCode () override
 
StateCompType getStateCompType ()
 
- Public Member Functions inherited from hal::BooleanFunctionTableEntry
 BooleanFunctionTableEntry (u32 gateId)
 
QString getEntryIdentifier () const
 
QString getEntryValueString () const
 
u32 getGateId () const
 
EntryType getEntryType () const
 

Additional Inherited Members

- Protected Attributes inherited from hal::BooleanFunctionTableEntry
QString mLeft
 
QString mRight
 
u32 mGateId
 
EntryType mType
 

Detailed Description

Utility class that represents a state of the StateComponent.

Definition at line 259 of file boolean_function_table_model.h.

Member Enumeration Documentation

◆ StateCompType

Enumerator
PosState 
NegState 

Definition at line 263 of file boolean_function_table_model.h.

Constructor & Destructor Documentation

◆ StateComponentEntry()

hal::StateComponentEntry::StateComponentEntry ( u32  gateId,
StateCompType  type,
QString  stateVal 
)

The constructor.

Parameters
gateId- The id of the gate the state belongs to.
name- The name of the state (pos. / neg.).
stateVal- The value of the state.

Definition at line 103 of file boolean_function_table_model.cpp.

References hal::BooleanFunctionTableEntry::mLeft, hal::BooleanFunctionTableEntry::mRight, hal::BooleanFunctionTableEntry::mType, hal::BooleanFunctionTableEntry::StateComp, and type.

Member Function Documentation

◆ getPythonCode()

QString hal::StateComponentEntry::getPythonCode ( )
overridevirtual

Returns the python code necessary to access the entry's value through a gate. This function should return an empty string if no python code is available. (E.g. when a "random" boolean function is displayed that belongs to no gate or component)

Returns
The python code if available or an empty string otherwise.

Reimplemented from hal::BooleanFunctionTableEntry.

Definition at line 111 of file boolean_function_table_model.cpp.

References hal::BooleanFunctionTableEntry::mGateId, hal::PyCodeProvider::pyCodeStateCompNegState(), and hal::PyCodeProvider::pyCodeStateCompPosState().

◆ getStateCompType()

StateCompType hal::StateComponentEntry::getStateCompType ( )
inline

Definition at line 274 of file boolean_function_table_model.h.


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