mirror of
https://github.com/Heretek-AI/GDevelop.git
synced 2026-07-25 04:15:49 -04:00
fdf31508b8
git-svn-id: svn://localhost@708 8062f311-0dae-4547-b526-b8ab9ac864a5
44 lines
1.2 KiB
C++
44 lines
1.2 KiB
C++
#include "InstructionMetadata.h"
|
|
#include "GDCore/CommonTools.h"
|
|
|
|
namespace gd
|
|
{
|
|
|
|
InstructionMetadata::InstructionMetadata(std::string instructionNamespace_) :
|
|
canHaveSubInstructions(false),
|
|
extensionNamespace(instructionNamespace_)
|
|
{
|
|
}
|
|
|
|
ParameterMetadata::ParameterMetadata() :
|
|
optional(false),
|
|
codeOnly(false)
|
|
{
|
|
}
|
|
|
|
ParameterMetadata & InstructionMetadata::AddParameter(const std::string & type, const wxString & description, const std::string & optionalObjectType, bool parameterIsOptional)
|
|
{
|
|
ParameterMetadata info;
|
|
info.type = type;
|
|
info.description = gd::ToString(description);
|
|
info.codeOnly = false;
|
|
info.optional = parameterIsOptional;
|
|
info.supplementaryInformation = optionalObjectType.empty() ? "" : extensionNamespace+optionalObjectType;
|
|
|
|
parameters.push_back(info);
|
|
return parameters.back();
|
|
}
|
|
|
|
ParameterMetadata & InstructionMetadata::AddCodeOnlyParameter(const std::string & type, const std::string & supplementaryInformation)
|
|
{
|
|
ParameterMetadata info;
|
|
info.type = type;
|
|
info.codeOnly = true;
|
|
info.supplementaryInformation = supplementaryInformation;
|
|
|
|
parameters.push_back(info);
|
|
return parameters.back();
|
|
}
|
|
|
|
}
|