GDevelop Core
Core library for developing platforms and tools compatible with GDevelop.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Public Types | Public Member Functions | Static Public Member Functions | List of all members
gd::ExpressionCompletionDescription Struct Reference

Describe completions to be shown to the user. More...

#include <ExpressionCompletionFinder.h>

Public Types

enum  CompletionKind { Object, Behavior, Expression, Variable }
 

Public Member Functions

bool operator== (const ExpressionCompletionDescription &other) const
 
CompletionKind GetCompletionKind () const
 Return the kind of the completion.
 
const gd::StringGetType () const
 Return the type of the completion (same type as types supported in expressions) (in other words, for expression this is the type of what must be returned).
 
const gd::StringGetPrefix () const
 Return the prefix currently entered and that must be completed.
 
const gd::StringGetObjectName () const
 Return the object name, if completing an object expression or a behavior.
 
const gd::StringGetBehaviorName () const
 Return the behavior name, if completing an object behavior expression. More...
 
ExpressionCompletionDescriptionSetIsExact (bool isExact_)
 Set if the completion description is exact, i.e: it's not used to complete anything. Rather, it should display information about what is described by the completion.
 
bool IsExact () const
 Check if the completion description is exact, i.e: it's not used to complete anything. Rather, it should display information about what is described by the completion.
 
 ExpressionCompletionDescription ()
 

Static Public Member Functions

static
ExpressionCompletionDescription 
ForObject (const gd::String &type_, const gd::String &prefix_)
 Create a completion for an object with the given prefix.
 
static
ExpressionCompletionDescription 
ForBehavior (const gd::String &prefix_, const gd::String &objectName_)
 Create a completion for a behavior with the given prefix of the specified object.
 
static
ExpressionCompletionDescription 
ForVariable (const gd::String &type_, const gd::String &prefix_)
 Create a completion for a variable with the given prefix.
 
static
ExpressionCompletionDescription 
ForExpression (const gd::String &type_, const gd::String &prefix_, const gd::String &objectName_="", const gd::String &behaviorName_="")
 Create a completion for an expression (free, object or behavior expression) with the given prefix.
 

Detailed Description

Describe completions to be shown to the user.

The IDE is responsible for actually searching and showing the completions - this is only describing what must be listed.

Member Enumeration Documentation

The different kind of completions that can be described.

Constructor & Destructor Documentation

gd::ExpressionCompletionDescription::ExpressionCompletionDescription ( )
inline

Default constructor, only to be used by Emscripten bindings.

Member Function Documentation

const gd::String& gd::ExpressionCompletionDescription::GetBehaviorName ( ) const
inline

Return the behavior name, if completing an object behavior expression.

Warning
If completing a behavior, the behavior (partial) name is returned by GetPrefix.
bool gd::ExpressionCompletionDescription::operator== ( const ExpressionCompletionDescription other) const
inline

Check if two description of completions are equal


The documentation for this struct was generated from the following file: