Files
GDevelop/Core/GDCore/Events/Expression.h
T
Florian Rival a8559bfbbc Add clang-format to format (C++) source files automatically (#491)
* Update all CMakeLists of extensions to use clang-format
* Run clang-format on all Extensions
* Update GDCore CMakeLists.txt to add clang-format
* Run clang-format on GDCore files
* Update GDJS and GDCpp CMakeLists.txt to add clang-format
* Run clang-format on GDCpp and GDJS files
2018-05-09 15:57:38 -07:00

58 lines
1.3 KiB
C++

/*
* GDevelop Core
* Copyright 2008-2016 Florian Rival (Florian.Rival@gmail.com). All rights
* reserved. This project is released under the MIT License.
*/
#ifndef GDCORE_EXPRESSION_H
#define GDCORE_EXPRESSION_H
#include "GDCore/String.h"
namespace gd {
/**
* \brief Class representing an expression used as a parameter of a
* gd::Instruction. This class is nothing more than a wrapper around a
* gd::String.
*
* \see gd::Instruction
*
* \ingroup Events
*/
class GD_CORE_API Expression {
public:
/**
* \brief Construct an empty expression
*/
Expression(){};
/**
* \brief Construct an expression from a string
*/
Expression(gd::String plainString_) : plainString(plainString_){};
/**
* \brief Construct an expression from a const char *
*/
Expression(const char* plainString_) : plainString(plainString_){};
/**
* \brief Get the plain string representing the expression
*/
inline const gd::String& GetPlainString() const { return plainString; };
/**
* \brief Mimics std::string::c_str
*/
inline const char* c_str() const { return plainString.c_str(); };
virtual ~Expression(){};
private:
gd::String plainString; ///< The expression string
};
} // namespace gd
#endif // GDCORE_EXPRESSION_H