Model.h
1/* Distributed under the Apache License, Version 2.0.
2 See accompanying NOTICE file for details.*/
3
4#pragma once
5
6#include "engine/CommonDefs.h"
7#include "engine/common/controller/Controller.h"
8
9namespace pulse
10{
11 class Data;
15 class PULSE_DECL Model
16 {
17 public:
18 Model(Data& data) : m_data(data) {}
19 virtual ~Model() = default;
20
21 virtual void Clear() = 0;
22
24 virtual void Initialize() { SetUp(); }// NOT called when loading a state
25 virtual void SetUp() = 0; // Called after Initialize if stablizing, or after serialization if loading in a state
26
28 virtual void AtSteadyState() = 0;
29 virtual void PreProcess() = 0;
30 // This is where any circuits would be solved or graphs transported
31 virtual void Process(bool solve_and_transport = true) = 0;
32 virtual void PostProcess(bool solve_and_transport = true) = 0;
33
34 protected:
35 Data& m_data;
36 };
37END_NAMESPACE
Definition: Logger.h:14

Distributed under the Apache License, Version 2.0.

See accompanying NOTICE file for details.