Chi-Tech
ChiObject.h
Go to the documentation of this file.
1#ifndef CHITECH_CHIOBJECT_H
2#define CHITECH_CHIOBJECT_H
3
4#include "chi_runtime.h"
6
8{
9private:
11
12public:
13 /**Returns the input parameters. For the base ChiObject, there
14 * are now parameters loaded.*/
16
17 /**Default constructor. This will be removed in future.*/
18 ChiObject();
19
20 /**Constructor with input parameters.*/
21 explicit ChiObject(const chi::InputParameters& params);
22
23 // Setters
24 /**Sets the stack id of the object. This allows this
25 * object to know its place in the global space.*/
26 void SetStackID(size_t stack_id);
27
28 // Getters
29 /**Returns the stack id of this object. This can be used
30 * with input language to connect objects together.*/
31 size_t StackID() const;
32
33 /**An overridable callback that is called by the ObjectMaker and by default
34 * adds the object onto the object stack. This function can be used to
35 * place the object on a different stack.*/
36 virtual void PushOntoStack(std::shared_ptr<ChiObject>& new_object);
37
38 virtual ~ChiObject() = default;
39};
40
41#endif // CHITECH_CHIOBJECT_H
static const size_t SIZE_T_INVALID
Definition: chi_runtime.h:100
virtual void PushOntoStack(std::shared_ptr< ChiObject > &new_object)
Definition: ChiObject.cc:17
ChiObject()
Definition: ChiObject.cc:9
void SetStackID(size_t stack_id)
Definition: ChiObject.cc:13
size_t StackID() const
Definition: ChiObject.cc:15
virtual ~ChiObject()=default
size_t stack_id_
Definition: ChiObject.h:10
static chi::InputParameters GetInputParameters()
Definition: ChiObject.cc:4