GDevelop Core
Core library for developing platforms and tools compatible with GDevelop.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
Classes | Typedefs | Functions | Variables
gd Namespace Reference

Classes

struct  _Unique_if
 
struct  _Unique_if< T[]>
 
struct  _Unique_if< T[N]>
 
class  AbstractFileSystem
 An interface to manipulate files in a platform agnostic way. This allow exporters to work on files without knowing what is actually being used to manipulate files (Node.js, browser shims, etc...) More...
 
class  Animation
 Class representing an animation of a SpriteObject. More...
 
class  ArbitraryEventsWorker
 ArbitraryEventsWorker is an abstract class used to browse events (and instructions) and do some work on them. Can be used to implement refactoring for example. More...
 
class  ArbitraryEventsWorkerWithContext
 An events worker that will know about the context (the objects container). Useful for workers working on expressions notably. More...
 
class  ArbitraryResourceWorker
 ArbitraryResourceWorker is used so as to inventory resources and sometimes update them. More...
 
class  AudioResource
 Describe an audio file used by a project. More...
 
class  BaseEvent
 Base class defining an event. More...
 
class  Behavior
 Base class used to represents a behavior that can be applied to an object. More...
 
class  BehaviorContent
 Store the content (i.e: the properties) of a behavior of an object. More...
 
class  BehaviorMetadata
 Contains user-friendly information about a behavior type. More...
 
class  BehaviorsSharedData
 Base class for defining data shared by behaviors having the same type and name. More...
 
class  BuiltinExtensionsImplementer
 Tool class containing static methods to setup an extension so that it provides standards events, objects or instructions of an extension. More...
 
class  Camera
 A camera is used to render a specific area of a layout. More...
 
class  CommentEvent
 Allows to add a text in the events editor. More...
 
class  CompilationInfo
 Class used by gd::PlatformExtension to ensure that an extension is compiled against the right versions of libraries. More...
 
class  Direction
 Class defining a direction (set of frames) of an Animation. More...
 
class  Effect
 Represents an effect that can be applied on a layer. More...
 
class  EffectMetadata
 Contains user-friendly information about an effect. More...
 
class  EffectsCodeGenerator
 Internal class used to generate code from events. More...
 
class  EmptyEvent
 Empty event doing nothing. More...
 
struct  EmptyNode
 An empty node, used when parsing failed/a syntax error was encountered and any other node could not make sense. More...
 
class  EventMetadata
 Describe an event provided by an extension of a platform. More...
 
class  EventsBasedBehavior
 Represents a behavior that is implemented with events. More...
 
class  EventsCodeGenerationContext
 Used to manage the context when generating code for events. More...
 
class  EventsCodeGenerator
 Internal class used to generate code from events. More...
 
class  EventsContext
 Store the results of a search done by EventsContextAnalyzer. More...
 
class  EventsContextAnalyzer
 Analyze events to list all the objects being used in them. More...
 
class  EventsFunction
 Events that can be generated as a stand-alone function, and used as a condition, action or expression. More...
 
class  EventsFunctionsContainer
 Used as a base class for classes that will own events-backed functions. More...
 
class  EventsFunctionsExtension
 Hold a list of Events Functions (gd::EventsFunction) and Events Based Behaviors. More...
 
class  EventsFunctionTools
 
class  EventsList
 A list of events. More...
 
class  EventsListSerialization
 Contains tools for loading and saving events to SerializerElement. More...
 
class  EventsParametersLister
 List the values of the parameters of events and their type. More...
 
class  EventsRefactorer
 Class containing functions to do refactoring tasks on events. More...
 
class  EventsRemover
 List the values of the parameters of events and their type. More...
 
class  EventsSearchResult
 Class used to return result when calling EventsRefactorer::SearchInEvents. More...
 
class  EventsTypesLister
 List the values of the parameters of events and their type. More...
 
class  EventsVariablesFinder
 Perform a search over a project or a layout, searching for layout, global or object variables. More...
 
class  Expression
 Class representing an expression used as a parameter of a gd::Instruction. This class is nothing more than a wrapper around a gd::String. More...
 
class  ExpressionCodeGenerationInformation
 Information about how generate code for an expression. More...
 
class  ExpressionCodeGenerator
 Generate code for a parsed expression. More...
 
class  ExpressionFunctionRenamer
 Go through the nodes and change the given object name to a new one. More...
 
class  ExpressionMetadata
 Describe user-friendly information about an expression, its parameters and the function name as well as other information for code generation. More...
 
struct  ExpressionNode
 The base node, from which all nodes in the tree of an expression inherits from. More...
 
class  ExpressionNodeLocationFinder
 Find the deepest node at the specified location in an expression. More...
 
class  ExpressionObjectFinder
 Go through the nodes and check if the given object is being used in the expression. More...
 
class  ExpressionObjectRenamer
 Go through the nodes and change the given object name to a new one. More...
 
class  ExpressionObjectsAnalyzer
 Go through the nodes and report any object found. More...
 
class  ExpressionParameterMover
 Go through the nodes and change the position of a parameter of the given function. More...
 
class  ExpressionParameterSearcher
 Go through the nodes and change the given object name to a new one. More...
 
class  ExpressionParser2
 Parse an expression, returning a tree of node corresponding to the parsed expression. More...
 
class  ExpressionParser2NodePrinter
 Print the expression corresponding to a set of nodes (i.e: this is doing the inverse operation of gd::ExpressionParser2). More...
 
class  ExpressionParser2NodeWorker
 The interface for any worker class ("visitor" pattern) that want to interact with the nodes of a parsed expression. More...
 
struct  ExpressionParserDiagnostic
 A diagnostic that can be attached to a gd::ExpressionNode. More...
 
struct  ExpressionParserError
 An error that can be attached to a gd::ExpressionNode. More...
 
struct  ExpressionParserLocation
 
class  ExpressionsParameterMover
 Move in expressions, in parameters of actions or conditions, a parameter from one position to another. More...
 
class  ExpressionsRenamer
 Replace in expressions, in parameters of actions or conditions, calls to a function by another function. More...
 
class  ExpressionValidator
 Validate that an expression is properly written by returning any error attached to the nodes during parsing. More...
 
class  ExtensionAndMetadata
 A container for metadata about an object/behavior/instruction/expression and its associated extension. More...
 
class  ExtensionsLoader
 Internal class loading static extensions. More...
 
class  ExternalEvents
 Contains a list of events not directly linked to a layout. More...
 
struct  ExternalEventsHasName
 Functor testing ExternalEvents' name. More...
 
class  ExternalLayout
 An external layout allows to create layouts of objects that can be then inserted on a layout. More...
 
struct  ExternalLayoutHasName
 Functor testing ExternalLayout' name. More...
 
struct  ExternalSourceFileHasName
 
class  FileStream
 
class  FontResource
 Describe a font file used by a project. More...
 
class  ForEachEvent
 Event repeated for each object of a list. More...
 
struct  FunctionNode
 A function node. For example: "MyExtension::MyFunction(1, 2)". More...
 
struct  FunctionOrEmptyNode
 
class  GroupEvent
 A group event, containing only sub events and some (visual only) properties. More...
 
class  HighestZOrderFinder
 Tool class picking returning the highest Z order of instances on a layer. More...
 
struct  IdentifierNode
 An identifier node, usually representing an object. More...
 
struct  IdentifierOrFunctionOrEmptyNode
 
class  ImageManager
 Manage images for the IDE as well as at runtime for GD C++ Platform, providing an easy way to get SFML images or OpenGL textures. More...
 
class  ImageResource
 Describe an image/texture used by a project. More...
 
class  InitialInstance
 Represents an instance of an object to be created on a layout start up. More...
 
class  InitialInstanceFunctor
 Tool class to be used with gd::InitialInstancesContainer::IterateOverInstances. More...
 
class  InitialInstancesContainer
 Defines a container of gd::InitialInstances. More...
 
class  Instruction
 An instruction is a member of an event: It can be a condition or an action. More...
 
class  InstructionMetadata
 Describe user-friendly information about an instruction (action or condition), its parameters and the function name as well as other information for code generation. More...
 
class  InstructionSentenceFormatter
 Generate user friendly sentences and information from an action or condition metadata. More...
 
class  InstructionsList
 
class  InstructionsParameterMover
 Reorder the parameters of the instruction with the specified type in events, moving the parameter at the specified oldIndex to newIndex. More...
 
class  InstructionsTypeRenamer
 Replace in events all instructions of the specified type by another type. More...
 
class  JsonResource
 Describe a json file used by a project. More...
 
class  Layer
 Represents a layer of a layout. More...
 
struct  LayerHasName
 Functor testing layer name. More...
 
class  Layout
 Represent a layout ( also called a scene ) of a project. More...
 
class  LayoutEditorCanvasOptions
 Tool class used to store settings of a LayoutEditorCanvas. More...
 
struct  LayoutHasName
 Functor testing layout name. More...
 
class  LinkEvent
 A link pointing to external events (or events of another layout) that should be included and run instead of the link. More...
 
class  LoadingScreen
 Describe the content and set up of the loading screen. More...
 
class  MetadataProvider
 Allow to easily get metadata for instructions (i.e actions and conditions), expressions, objects and behaviors. More...
 
class  NamedPropertyDescriptor
 Used to describe a property shown in a property grid. More...
 
class  NewNameGenerator
 Generate unique names. More...
 
struct  NumberNode
 A number node. For example: "123". More...
 
class  Object
 Base class used to represent an object of a platform. More...
 
class  ObjectGroup
 Represents an object group. More...
 
class  ObjectGroupsContainer
 A container for objects groups. More...
 
struct  ObjectHasName
 Functor testing object name. More...
 
class  ObjectMetadata
 Contains user-friendly information about an object type, and a function to create a new gd::Object of this type. More...
 
class  ObjectsContainer
 Used as a base class for classes that will own objects (see gd::Object). More...
 
struct  OperatorNode
 An operator node. For example: "lhs + rhs". More...
 
class  ParameterMetadata
 Contains user-friendly info about a parameter, and information about what a parameter need. More...
 
class  ParameterMetadataTools
 
class  Platform
 Base class for implementing a platform. More...
 
class  PlatformExtension
 Base class for implementing platform's extensions. More...
 
class  PlatformLoader
 Load a gd::Platform in memory from a file and add it to the manager. More...
 
class  PlatformManager
 Singleton class managing all the platforms available. More...
 
class  PlatformSpecificAssets
 Store the icons, splashscreens or reference to any other asset that can be needed when exporting the game. More...
 
class  Project
 Base class representing a project (game), including all resources, scenes, objects, extensions... More...
 
class  ProjectResourcesAdder
 Automatically add missing resources of a project. More...
 
class  ProjectResourcesCopier
 Copy all resources files of a project to a directory. More...
 
class  ProjectStripper
 Tool class providing methods to strip useless data for a project after it has been exported. More...
 
class  PropertyDescriptor
 Used to describe a property shown in a property grid. More...
 
class  RepeatEvent
 Event being repeated a specified number of times. More...
 
class  Resource
 Base class to describe a resource used by a game. More...
 
class  ResourceFolder
 
class  ResourcesAbsolutePathChecker
 Helper used to check if a project has at least a resource with an absolute filename. More...
 
class  ResourcesInUseHelper
 Class used to track all resources used by a game, or a part of it (like a gd::Object). More...
 
class  ResourcesLoader
 Class used by games to load resources from files: this is purely an abstraction to most SFML loadFrom* functions. More...
 
class  ResourcesManager
 Inventory all resources used by a project. More...
 
class  ResourcesMergingHelper
 ResourcesMergingHelper is used (mainly during export) to list resources and generate new filenames, to allow them to be all copied in a single directory (potentially changing the filename to avoid conflicts, but preserving extensions). More...
 
class  SceneNameMangler
 Mangle the name of a scene, so that it can be used in code or file names. More...
 
class  SerializableWithNameList
 A class template that store a list of elements that can be accessed by their names and serialized. More...
 
class  Serializer
 The class used to save/load projects and GDCore classes from/to XML or JSON. More...
 
class  SerializerElement
 A generic container that can represent a value ( containing a string, double, bool or int), an object ("associative array", "dictionary") with children or an array (children indexed by numeric properties). More...
 
class  SerializerValue
 A value stored inside a gd::SerializerElement. More...
 
class  SFMLFileStream
 
class  SourceFile
 Represents a "physical" source file. More...
 
class  Sprite
 Represents a sprite to be displayed on the screen. More...
 
class  SpriteObject
 Standard sprite object for extensions that implements the standard SpriteExtension (see gd::BuiltinExtensionsImplementer::ImplementsSpriteExtension). More...
 
class  SPtrList
 
class  StandardEvent
 Standard event, with conditions, actions and support for sub events. More...
 
struct  StreamHolder
 A class holding a buffer and/or a file stream (useful for SFML classes that needs their buffer/stream continuously opened) More...
 
class  String
 String represents an UTF8 encoded string. More...
 
struct  SubExpressionNode
 
class  SystemStats
 Tool class to provide information about the system. More...
 
class  TextFormatting
 Represents the style of a text displayed in the events editor. More...
 
struct  TextNode
 A text node. For example: "Hello World". More...
 
struct  UnaryOperatorNode
 A unary operator node. For example: "-2". More...
 
class  Variable
 Defines a variable which can be used by an object, a layout or a project. More...
 
struct  VariableAccessorNode
 A bracket accessor of a variable. Example: MyChild in MyVariable.MyChild. More...
 
struct  VariableAccessorOrVariableBracketAccessorNode
 
struct  VariableBracketAccessorNode
 A bracket accessor of a variable. Example: ["MyChild"] (in MyVariable["MyChild"]). More...
 
struct  VariableNode
 A variable, potentially with accessor to its children. More...
 
class  VariablesContainer
 Class defining a container for gd::Variable. More...
 
class  VersionWrapper
 Used to get information about GDevelop Core version. More...
 
class  VideoResource
 Describe a video file used by a project. More...
 
class  WhileEvent
 While event is a standard event that is repeated while some conditions are true. More...
 
class  WholeProjectRefactorer
 Tool functions to do refactoring on the whole project after changes like deletion or renaming of an object. More...
 

Typedefs

typedef std::shared_ptr
< BaseEvent
BaseEventSPtr
 

Functions

double Pi ()
 
double Round (double d)
 
void ExposeProjectEffects (const gd::Project &project, const std::function< void(const gd::Effect &effect)> &worker)
 
BaseEventSPtr GD_CORE_API CloneRememberingOriginalEvent (BaseEventSPtr event)
 
void OpenPoint (Point &point, const gd::SerializerElement &element)
 
void OpenPointsSprites (vector< Point > &points, const gd::SerializerElement &element)
 
void SavePoint (const Point &point, gd::SerializerElement &element)
 
void SavePointsSprites (const vector< Point > &points, gd::SerializerElement &element)
 
void SaveSpritesDirection (const vector< Sprite > &sprites, gd::SerializerElement &element)
 
gd::String ReplaceAllOccurencesCaseUnsensitive (gd::String context, gd::String from, const gd::String &to)
 
void LaunchResourceWorkerOnEvents (const gd::Project &project, gd::EventsList &events, gd::ArbitraryResourceWorker &worker)
 
std::vector< gd::StringGetHiddenLayers (const Layout &layout)
 Get the names of all layers from the given layout that are invisible. More...
 
gd::String GD_CORE_API GetTypeOfObject (const ObjectsContainer &game, const ObjectsContainer &layout, gd::String objectName, bool searchInGroups=true)
 Get a type from an object/group name. More...
 
gd::String GD_CORE_API GetTypeOfBehavior (const ObjectsContainer &game, const ObjectsContainer &layout, gd::String behaviorName, bool searchInGroups=true)
 Get a type from a behavior name. More...
 
vector< gd::String > GD_CORE_API GetBehaviorsOfObject (const ObjectsContainer &game, const ObjectsContainer &layout, gd::String objectName, bool searchInGroups=true)
 Get behaviors of an object/group. More...
 
String GD_CORE_API operator+ (String lhs, const String &rhs)
 
String GD_CORE_API operator+ (String lhs, const char *rhs)
 
String GD_CORE_API operator+ (const char *lhs, const String &rhs)
 
bool GD_CORE_API operator== (const String &lhs, const String &rhs)
 
bool GD_CORE_API operator== (const String &lhs, const char *rhs)
 
bool GD_CORE_API operator== (const char *lhs, const gd::String &rhs)
 
bool GD_CORE_API operator!= (const String &lhs, const String &rhs)
 
bool GD_CORE_API operator!= (const String &lhs, const char *rhs)
 
bool GD_CORE_API operator!= (const char *lhs, const String &rhs)
 
bool GD_CORE_API operator< (const String &lhs, const String &rhs)
 
bool GD_CORE_API operator< (const String &lhs, const char *rhs)
 
bool GD_CORE_API operator< (const char *lhs, const String &rhs)
 
bool GD_CORE_API operator<= (const String &lhs, const String &rhs)
 
bool GD_CORE_API operator<= (const String &lhs, const char *rhs)
 
bool GD_CORE_API operator<= (const char *lhs, const String &rhs)
 
bool GD_CORE_API operator> (const String &lhs, const String &rhs)
 
bool GD_CORE_API operator> (const String &lhs, const char *rhs)
 
bool GD_CORE_API operator> (const char *lhs, const String &rhs)
 
bool GD_CORE_API operator>= (const String &lhs, const String &rhs)
 
bool GD_CORE_API operator>= (const String &lhs, const char *rhs)
 
bool GD_CORE_API operator>= (const char *lhs, const String &rhs)
 
std::ostream &GD_CORE_API operator<< (std::ostream &os, const String &str)
 
std::istream &GD_CORE_API operator>> (std::istream &is, String &str)
 
bool GD_CORE_API CaseSensitiveEquiv (String lhs, String rhs, bool compat)
 
bool GD_CORE_API CaseInsensitiveEquiv (const String &lhs, const String &rhs, bool compat)
 
Handle OpenLibrary (const char *path)
 Open a raw C++ dynamic library. More...
 
void * GetSymbol (Handle library, const char *name)
 Get a raw symbol from a raw C++ dynamic library.
 
void CloseLibrary (Handle library)
 Close a raw C++ dynamic library. More...
 
gd::String DynamicLibraryLastError ()
 Get the last error occurred when loading a dynamic library.
 
Handle SetLibraryGlobal (const char *path)
 
template<typename T >
T & HexToRgb (int hexValue, T &output)
 
void GD_CORE_API LogWarning (const gd::String &msg)
 Standard function that should be used when emitting a warning to be displayed to the user.
 
void GD_CORE_API LogError (const gd::String &msg)
 Standard function that should be used when emitting an error to be displayed to the user.
 
void GD_CORE_API LogMessage (const gd::String &msg)
 Standard function that should be used when emitting a message to be displayed to the user.
 
void GD_CORE_API LogStatus (const gd::String &msg)
 Standard function that should be used when emitting a status message to be displayed to the user.
 
template<class T , class... Args>
_Unique_if< T >::_Single_object make_unique (Args &&...args)
 
template<class T >
_Unique_if< T >::_Unknown_bound make_unique (size_t n)
 
template<class T , class... Args>
_Unique_if< T >::_Known_bound make_unique (Args &&...)=delete
 
template<class T >
std::unique_ptr< T > Clone (const std::unique_ptr< T > &object)
 
template<class T >
std::vector< std::unique_ptr< T > > Clone (const std::vector< std::unique_ptr< T >> &vector)
 
int parseLine (char *line)
 
bool GD_CORE_API LoadXmlFromFile (TiXmlDocument &doc, const gd::String &filepath)
 
bool GD_CORE_API SaveXmlToFile (const TiXmlDocument &doc, const gd::String &filepath)
 

Variables

unsigned char InvalidImageData []
 

Detailed Description

Temporary implementation of make_unique as it's not available in C++11.

Function Documentation

void GD_CORE_API gd::CloseLibrary ( Handle  library)

Close a raw C++ dynamic library.

Note
Libraries are reference counted, so that the library will be really freed from memory when CloseLibrary will be called with the same amount of time OpenLibrary was called.
std::vector< gd::String > GD_CORE_API gd::GetBehaviorsOfObject ( const ObjectsContainer &  game,
const ObjectsContainer &  layout,
gd::String  objectName,
bool  searchInGroups = true 
)

Get behaviors of an object/group.

Note
The behaviors of a group are the behaviors which are found in common when looking all the objects of the group.
Returns
Vector containing names of behaviors
std::vector< gd::String > gd::GetHiddenLayers ( const Layout &  layout)

Get the names of all layers from the given layout that are invisible.

See also
gd::Layout
gd::String GD_CORE_API gd::GetTypeOfBehavior ( const ObjectsContainer &  game,
const ObjectsContainer &  layout,
gd::String  behaviorName,
bool  searchInGroups = true 
)

Get a type from a behavior name.

Returns
Type of the behavior.
gd::String GD_CORE_API gd::GetTypeOfObject ( const ObjectsContainer &  game,
const ObjectsContainer &  layout,
gd::String  objectName,
bool  searchInGroups = true 
)

Get a type from an object/group name.

Note
If a group contains only objects of a same type, then the group has this type. Otherwise, it is considered as an object without any specific type.
Returns
Type of the object/group.
Handle GD_CORE_API gd::OpenLibrary ( const char *  path)

Open a raw C++ dynamic library.

On system with POSIX support, loading is made with RTLD_LAZY and RTLD_LOCAL flags. If symbols of libraries need to be available globally, call SetLibraryGlobal after.

Variable Documentation

unsigned char gd::InvalidImageData[]

Invalid image is a 100*100 PNG file.