Antares Simulator
Power System Simulator
Loading...
Searching...
No Matches
action.hxx
1/*
2** Copyright 2007-2024, RTE (https://www.rte-france.com)
3** See AUTHORS.txt
4** SPDX-License-Identifier: MPL-2.0
5** This file is part of Antares-Simulator,
6** Adequacy and Performance assessment for interconnected energy networks.
7**
8** Antares_Simulator is free software: you can redistribute it and/or modify
9** it under the terms of the Mozilla Public Licence 2.0 as published by
10** the Mozilla Foundation, either version 2 of the License, or
11** (at your option) any later version.
12**
13** Antares_Simulator is distributed in the hope that it will be useful,
14** but WITHOUT ANY WARRANTY; without even the implied warranty of
15** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16** Mozilla Public Licence 2.0 for more details.
17**
18** You should have received a copy of the Mozilla Public Licence 2.0
19** along with Antares_Simulator. If not, see <https://opensource.org/license/mpl-2-0/>.
20*/
21#ifndef __ANTARES_LIBS_STUDY_ACTION_ACTION_HXX__
22#define __ANTARES_LIBS_STUDY_ACTION_ACTION_HXX__
23
24namespace Antares
25{
26namespace Action
27{
28inline bool IAction::bold() const
29{
30 return false;
31}
32
33inline bool IAction::autoExpand() const
34{
35 return false;
36}
37
38inline Behavior IAction::behavior() const
39{
40 ThreadingPolicy::MutexLocker locker(*this);
41 return pInfos.behavior;
42}
43
44inline State IAction::state() const
45{
46 ThreadingPolicy::MutexLocker locker(*this);
47 return pInfos.state;
48}
49
50inline bool IAction::canDoSomething() const
51{
52 return true;
53}
54
55inline bool IAction::allowUpdate() const
56{
57 return false;
58}
59
60inline bool IAction::allowSkip() const
61{
62 return true;
63}
64
65inline bool IAction::allowOverwrite() const
66{
67 return true;
68}
69
70inline bool IAction::shouldPrepareRootNode() const
71{
72 return false;
73}
74
75inline void IAction::datagridCaption(Yuni::String&)
76{
77}
78
79inline bool IAction::visible() const
80{
81 return true;
82}
83
85{
86 // do nothing
87}
88
89} // namespace Action
90} // namespace Antares
91
92#endif // __ANTARES_LIBS_STUDY_ACTION_ACTION_HXX__
State state
State of the action.
Definition fwd.h:58
Behavior behavior
Behavior of the action.
Definition fwd.h:56
virtual void createPostActionsWL(const IAction::Ptr &node)
Create post actions (if any)
Definition action.hxx:84
virtual bool bold() const
Get if the action should be represented with a bold font.
Definition action.hxx:28
AncestorType::Ptr Ptr
The most suitable smart ptr for the class.
Definition action.h:43
Behavior behavior() const
Get the behavior.
Definition action.hxx:38
ActionInformations pInfos
All data related to the action.
Definition action.h:168
virtual bool autoExpand() const
Auto-expand.
Definition action.hxx:33
virtual bool visible() const
Get if the action should be visible to the user.
Definition action.hxx:79