pytuflow.BCDatabaseRunState

pytuflow.BCDatabaseRunState#

class BCDatabaseRunState(build_state, context, parent)#

Bases: DatabaseRunState

Class for storing the run state of a bc_dbase.csv.

This class should not be instantiated directly, but rather it should be created from an instance of a BuildState class using the context method of the BuildState class.

Parameters:
  • build_state (BCDatabase) – The BuildState object that the RunState object is based on.

  • context (Context) – The context object that the RunState object is based on.

  • parent (ControlFileRunState) – The parent control file run state.

__init__(build_state, context, parent)#
Parameters:
  • build_state (BuildState) – The BuildState object that the RunState object is based on.

  • context (Context) – The context object that the RunState object is based on.

  • parent (ControlFile) – The parent control file.

Methods

context

Returns the ScopeList that makes up the objects Context for the given RunState Object.

items

Returns an iterator over the (key, value) pairs in the database.

value

Returns the value of the given index.

Attributes

TUFLOW_TYPE

Return the TUFLOW type of the input.

df

fpath

scope

List of scopes associated with the object.

tcf

bs

the BuildState object that the RunState object is based on.

parent

The parent control file run state.

config

Configuration object for the TUFLOW control file.

loaded

whether the database has been loaded from disk or not.

ctx

the context object that the RunState object is based on.

entries

Ordered dictionary containing the database entries.