DISPLACE  1.0
A spatial model of fisheries to help sustainable fishing and maritime spatial planning
DbHelper Class Reference

#include <dbhelper.h>

Inheritance diagram for DbHelper:

Classes

struct  Impl
 

Public Member Functions

 DbHelper ()
 
 ~DbHelper () noexcept
 
bool attachDb (std::shared_ptr< SQLiteOutputStorage > storage)
 
QString lastDbError () const
 
bool Q_DECL_DEPRECATED loadConfig (Config &)
 
bool Q_DECL_DEPRECATED saveConfig (const Config &)
 
bool Q_DECL_DEPRECATED loadScenario (Scenario &)
 
bool Q_DECL_DEPRECATED saveScenario (const Scenario &)
 
bool loadNodes (QList< std::shared_ptr< NodeData > > &nodes, QList< std::shared_ptr< HarbourData > > &harbours, DisplaceModel *model)
 
bool loadVessels (const QList< std::shared_ptr< NodeData > > &nodes, QList< std::shared_ptr< VesselData > > &vessels)
 
bool loadFishFarms (const QList< std::shared_ptr< NodeData > > &nodes, QList< std::shared_ptr< FishfarmData >> &fishfarms)
 
bool updateVesselsToStep (int steps, QList< std::shared_ptr< VesselData > > &vessels)
 
bool updateStatsForNodesToStep (int step, QList< std::shared_ptr< NodeData > > &nodes)
 
bool updatePopValuesForNodesToStep (int step, QList< std::shared_ptr< NodeData > > &nodes)
 
HarbourStats getHarbourStatsAtStep (int idx, int step)
 
void setMetadata (QString key, QString value)
 
QString getMetadata (QString key)
 
int getLastKnownStep ()
 

Constructor & Destructor Documentation

◆ DbHelper()

DbHelper::DbHelper ( )

◆ ~DbHelper()

DbHelper::~DbHelper ( )
defaultnoexcept

Member Function Documentation

◆ attachDb()

bool DbHelper::attachDb ( std::shared_ptr< SQLiteOutputStorage storage)

◆ getHarbourStatsAtStep()

HarbourStats DbHelper::getHarbourStatsAtStep ( int  idx,
int  step 
)

◆ getLastKnownStep()

int DbHelper::getLastKnownStep ( )

◆ getMetadata()

QString DbHelper::getMetadata ( QString  key)

◆ lastDbError()

QString DbHelper::lastDbError ( ) const

◆ loadConfig()

bool DbHelper::loadConfig ( Config cfg)

◆ loadFishFarms()

bool DbHelper::loadFishFarms ( const QList< std::shared_ptr< NodeData > > &  nodes,
QList< std::shared_ptr< FishfarmData >> &  fishfarms 
)

◆ loadNodes()

bool DbHelper::loadNodes ( QList< std::shared_ptr< NodeData > > &  nodes,
QList< std::shared_ptr< HarbourData > > &  harbours,
DisplaceModel model 
)

◆ loadScenario()

bool DbHelper::loadScenario ( Scenario sce)

◆ loadVessels()

bool DbHelper::loadVessels ( const QList< std::shared_ptr< NodeData > > &  nodes,
QList< std::shared_ptr< VesselData > > &  vessels 
)

◆ saveConfig()

bool DbHelper::saveConfig ( const Config cfg)

◆ saveScenario()

bool DbHelper::saveScenario ( const Scenario sce)

◆ setMetadata()

void DbHelper::setMetadata ( QString  key,
QString  value 
)

◆ updatePopValuesForNodesToStep()

bool DbHelper::updatePopValuesForNodesToStep ( int  step,
QList< std::shared_ptr< NodeData > > &  nodes 
)

◆ updateStatsForNodesToStep()

bool DbHelper::updateStatsForNodesToStep ( int  step,
QList< std::shared_ptr< NodeData > > &  nodes 
)

◆ updateVesselsToStep()

bool DbHelper::updateVesselsToStep ( int  steps,
QList< std::shared_ptr< VesselData > > &  vessels 
)

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