HAL
hal::BooleanFunctionTableEntry Class Reference

An entry in the boolean function table model. More...

#include <boolean_function_table_model.h>

Inheritance diagram for hal::BooleanFunctionTableEntry:
Inheritance graph
Collaboration diagram for hal::BooleanFunctionTableEntry:
Collaboration graph

Public Types

enum class  EntryType {
  BooleanFunctionStandard , CPBehavior , StateComp , FFComp ,
  LatchComp
}
 

Public Member Functions

 BooleanFunctionTableEntry (u32 gateId)
 
QString getEntryIdentifier () const
 
QString getEntryValueString () const
 
u32 getGateId () const
 
EntryType getEntryType () const
 
virtual QString getPythonCode ()
 

Protected Attributes

QString mLeft
 
QString mRight
 
u32 mGateId
 
EntryType mType
 

Detailed Description

An entry in the boolean function table model.

The boolean function table consists of boolean functions and clear-preset behaviors. Therefore the subclasses BooleanFunctionEntry and CPBehaviorEntry are used. However both entry types have an entry left and right so that the table looks like "left=right". These value can be accessed via getEntryIdentifier (left) and getEntryValueString (right).

Definition at line 50 of file boolean_function_table_model.h.

Member Enumeration Documentation

◆ EntryType

Enumerator
BooleanFunctionStandard 
CPBehavior 
StateComp 
FFComp 
LatchComp 

Definition at line 54 of file boolean_function_table_model.h.

Constructor & Destructor Documentation

◆ BooleanFunctionTableEntry()

hal::BooleanFunctionTableEntry::BooleanFunctionTableEntry ( u32  gateId)

Constructor.

Parameters
gateId- The id of the gate the boolean function/clear-preset behavior belongs to. If it belongs to no gate, an invalid id can be passed (i.e. gateId=0).

Definition at line 14 of file boolean_function_table_model.cpp.

References BooleanFunctionStandard, mGateId, and mType.

Member Function Documentation

◆ getEntryIdentifier()

QString hal::BooleanFunctionTableEntry::getEntryIdentifier ( ) const

Gets the left side of the equation.

Returns
the entry identifier

Definition at line 20 of file boolean_function_table_model.cpp.

References mLeft.

◆ getEntryType()

BooleanFunctionTableEntry::EntryType hal::BooleanFunctionTableEntry::getEntryType ( ) const

Returns the entry's type.

Returns
The entry's type.

Definition at line 34 of file boolean_function_table_model.cpp.

References mType.

◆ getEntryValueString()

QString hal::BooleanFunctionTableEntry::getEntryValueString ( ) const

Gets the right side of the equation.

Returns
the entry's value.

Definition at line 25 of file boolean_function_table_model.cpp.

References mRight.

◆ getGateId()

u32 hal::BooleanFunctionTableEntry::getGateId ( ) const

Returns the gate id the represented entry is associated with. The gate id may be invalid.

Returns
the associated gate id.

Definition at line 30 of file boolean_function_table_model.cpp.

References mGateId.

◆ getPythonCode()

virtual QString hal::BooleanFunctionTableEntry::getPythonCode ( )
inlinevirtual

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 in hal::StateComponentEntry, hal::LatchComponentEntry, hal::FFComponentEntry, and hal::BooleanFunctionEntry.

Definition at line 98 of file boolean_function_table_model.h.

Member Data Documentation

◆ mGateId

◆ mLeft

◆ mRight

◆ mType


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