GDevelop Core
Core library for developing platforms and tools compatible with GDevelop.
AbstractFunctionMetadata.h
1 /*
2  * GDevelop Core
3  * Copyright 2008-2016 Florian Rival ([email protected]). All rights
4  * reserved. This project is released under the MIT License.
5  */
6 
7 #pragma once
8 
9 #include <algorithm>
10 #include <functional>
11 #include <map>
12 #include <memory>
13 
14 #include "GDCore/Events/Instruction.h"
15 #include "GDCore/String.h"
16 #include "ParameterMetadata.h"
17 #include "ParameterOptions.h"
18 
19 namespace gd {
20 class Project;
21 class Layout;
22 class EventsCodeGenerator;
23 class EventsCodeGenerationContext;
24 class SerializerElement;
25 } // namespace gd
26 
27 namespace gd {
28 
36 class GD_CORE_API AbstractFunctionMetadata {
37 public:
39  virtual ~AbstractFunctionMetadata(){};
40 
44  virtual AbstractFunctionMetadata &
45  AddParameter(const gd::String &type, const gd::String &label,
46  const gd::String &supplementaryInformation = "",
47  bool parameterIsOptional = false) = 0;
48 
52  virtual AbstractFunctionMetadata &
54  const gd::String &supplementaryInformation) = 0;
55 
59  virtual AbstractFunctionMetadata &
60  SetDefaultValue(const gd::String &defaultValue) = 0;
61 
65  virtual AbstractFunctionMetadata &
66  SetParameterExtraInfo(const gd::String &defaultValue) = 0;
67 
71  virtual AbstractFunctionMetadata &
72  SetParameterLongDescription(const gd::String &longDescription) = 0;
73 
78 
84 
89 
94 
98  virtual AbstractFunctionMetadata &
100 
105 
112  virtual AbstractFunctionMetadata &
113  SetFunctionName(const gd::String &functionName) = 0;
114 
120  virtual AbstractFunctionMetadata &
121  SetIncludeFile(const gd::String &includeFile) = 0;
122 
126  virtual AbstractFunctionMetadata &
127  AddIncludeFile(const gd::String &includeFile) = 0;
128 
132  virtual const std::vector<gd::String> &GetIncludeFiles() const = 0;
133 
134 private:
135 };
136 
137 } // namespace gd
Describe user-friendly information about an expression or an instruction (action or condition),...
Definition: AbstractFunctionMetadata.h:36
virtual AbstractFunctionMetadata & SetRelevantForFunctionEventsOnly()=0
virtual AbstractFunctionMetadata & SetRelevantForCustomObjectEventsOnly()=0
virtual AbstractFunctionMetadata & SetParameterExtraInfo(const gd::String &defaultValue)=0
virtual AbstractFunctionMetadata & AddParameter(const gd::String &type, const gd::String &label, const gd::String &supplementaryInformation="", bool parameterIsOptional=false)=0
virtual AbstractFunctionMetadata & AddCodeOnlyParameter(const gd::String &type, const gd::String &supplementaryInformation)=0
virtual AbstractFunctionMetadata & SetParameterLongDescription(const gd::String &longDescription)=0
virtual AbstractFunctionMetadata & SetRelevantForLayoutEventsOnly()=0
virtual const std::vector< gd::String > & GetIncludeFiles() const =0
Get the files that must be included to use the instruction.
virtual AbstractFunctionMetadata & SetFunctionName(const gd::String &functionName)=0
Set the function that should be called when generating the source code from events.
virtual AbstractFunctionMetadata & SetPrivate()=0
virtual AbstractFunctionMetadata & SetHidden()=0
virtual AbstractFunctionMetadata & SetDefaultValue(const gd::String &defaultValue)=0
virtual AbstractFunctionMetadata & AddIncludeFile(const gd::String &includeFile)=0
Add a file to the already existing include files.
virtual AbstractFunctionMetadata & SetRelevantForAsynchronousFunctionEventsOnly()=0
virtual AbstractFunctionMetadata & SetIncludeFile(const gd::String &includeFile)=0
Erase any existing include file and add the specified include.
String represents an UTF8 encoded string.
Definition: String.h:33
Definition: CommonTools.h:24