13 #include "GDCore/CommonTools.h"
14 #include "GDCore/Extensions/Metadata/BehaviorMetadata.h"
15 #include "GDCore/Extensions/Metadata/DependencyMetadata.h"
16 #include "GDCore/Extensions/Metadata/EffectMetadata.h"
17 #include "GDCore/Extensions/Metadata/EventMetadata.h"
18 #include "GDCore/Extensions/Metadata/InstructionOrExpressionGroupMetadata.h"
19 #include "GDCore/Extensions/Metadata/ObjectMetadata.h"
20 #include "GDCore/Project/PropertyDescriptor.h"
21 #include "GDCore/String.h"
22 #include "GDCore/Tools/VersionPriv.h"
26 class InstructionMetadata;
27 class MultipleInstructionMetadata;
28 class ExpressionMetadata;
30 class BehaviorMetadata;
32 class DependencyMetadata;
35 class EventCodeGenerator;
36 class ArbitraryResourceWorker;
37 class BehaviorsSharedData;
40 class ObjectConfiguration;
43 typedef std::function<std::unique_ptr<gd::ObjectConfiguration>()> CreateFunPtr;
56 bool informationCompleted =
false;
58 bool runtimeOnly =
false;
62 int gccMajorVersion = 0;
63 int gccMinorVersion = 0;
64 int gccPatchLevel = 0;
67 int sfmlMajorVersion = 0;
68 int sfmlMinorVersion = 0;
116 category = category_;
129 helpPath = helpPath_;
246 std::shared_ptr<gd::ObjectConfiguration> instance);
284 std::shared_ptr<gd::Behavior> instance,
285 std::shared_ptr<gd::BehaviorsSharedData> sharedDatasInstance);
301 std::shared_ptr<gd::BaseEvent> instance);
345 return extensionPropertiesMetadata[name];
354 return instructionOrExpressionGroupMetadata[name];
361 void StripUnimplementedInstructionsAndExpressions();
414 const std::vector<gd::String>&
GetTags()
const {
return tags; }
421 tags = csvTags.
Split(
',');
422 for (
size_t i = 0; i < tags.size(); i++) {
423 tags[i] = tags[i].Trim().LowerCase();
445 bool IsBuiltin()
const;
458 std::vector<gd::String> GetExtensionObjectsTypes()
const;
464 std::vector<gd::String> GetBehaviorsTypes()
const;
470 CreateFunPtr GetObjectCreationFunctionPtr(
const gd::String& objectType)
const;
476 std::vector<gd::String> GetExtensionEffectTypes()
const;
483 std::shared_ptr<gd::BaseEvent> CreateEvent(
const gd::String& eventType)
const;
516 bool HasBehavior(
const gd::String& behaviorType)
const;
526 std::map<gd::String, gd::EventMetadata>& GetAllEvents();
532 std::map<gd::String, gd::InstructionMetadata>& GetAllActions();
537 std::map<gd::String, gd::InstructionMetadata>& GetAllConditions();
542 std::map<gd::String, gd::ExpressionMetadata>& GetAllExpressions();
547 std::map<gd::String, gd::ExpressionMetadata>& GetAllStrExpressions();
553 std::vector<gd::DependencyMetadata>& GetAllDependencies();
559 std::map<gd::String, gd::InstructionMetadata>& GetAllActionsForObject(
565 std::map<gd::String, gd::InstructionMetadata>& GetAllConditionsForObject(
571 std::map<gd::String, gd::ExpressionMetadata>& GetAllExpressionsForObject(
577 std::map<gd::String, gd::ExpressionMetadata>& GetAllStrExpressionsForObject(
583 std::map<gd::String, gd::InstructionMetadata>& GetAllActionsForBehavior(
589 std::map<gd::String, gd::InstructionMetadata>& GetAllConditionsForBehavior(
595 std::map<gd::String, gd::ExpressionMetadata>& GetAllExpressionsForBehavior(
601 std::map<gd::String, gd::ExpressionMetadata>& GetAllStrExpressionsForBehavior(
610 return extensionPropertiesMetadata;
617 const std::map<gd::String, InstructionOrExpressionGroupMetadata>&
619 return instructionOrExpressionGroupMetadata;
627 static std::vector<gd::String> GetBuiltinExtensionsNames();
638 static gd::String GetBehaviorEventsFunctionFullType(
646 static gd::String GetObjectEventsFunctionFullType(
680 std::vector<gd::String> tags;
682 std::map<gd::String, gd::ObjectMetadata> objectsInfos;
683 std::map<gd::String, gd::BehaviorMetadata> behaviorsInfo;
684 std::map<gd::String, gd::EffectMetadata> effectsMetadata;
685 std::map<gd::String, gd::InstructionMetadata> conditionsInfos;
686 std::map<gd::String, gd::InstructionMetadata> actionsInfos;
687 std::map<gd::String, gd::ExpressionMetadata> expressionsInfos;
688 std::map<gd::String, gd::ExpressionMetadata> strExpressionsInfos;
689 std::vector<gd::DependencyMetadata> extensionDependenciesMetadata;
690 std::map<gd::String, gd::EventMetadata> eventsInfos;
691 std::map<gd::String, gd::PropertyDescriptor> extensionPropertiesMetadata;
692 std::map<gd::String, InstructionOrExpressionGroupMetadata>
693 instructionOrExpressionGroupMetadata;
698 static std::map<gd::String, gd::InstructionMetadata>
699 badConditionsMetadata;
701 static std::map<gd::String, gd::InstructionMetadata>
704 static std::map<gd::String, gd::ExpressionMetadata>
705 badExpressionsMetadata;
714 #define GD_COMPLETE_EXTENSION_COMPILATION_INFORMATION() \
715 compilationInfo.runtimeOnly = false; \
716 compilationInfo.sfmlMajorVersion = 2; \
717 compilationInfo.sfmlMinorVersion = 0; \
718 compilationInfo.gdCoreVersion = GD_VERSION_STRING; \
719 compilationInfo.sizeOfpInt = sizeof(int*); \
720 compilationInfo.gccMajorVersion = __GNUC__; \
721 compilationInfo.gccMinorVersion = __GNUC_MINOR__; \
722 compilationInfo.gccPatchLevel = __GNUC_PATCHLEVEL__; \
723 compilationInfo.informationCompleted = true;
725 #include "GDCore/Extensions/PlatformExtension.inl"
Base class used to represents a behavior that can be applied to an object. It stores the content (i....
Definition: Behavior.h:23
Base class for defining data shared by behaviors having the same type and name.
Definition: BehaviorsSharedData.h:24
Class used by gd::PlatformExtension to ensure that an extension is compiled against the right version...
Definition: PlatformExtension.h:51
Used to describe a property shown in a property grid.
Definition: PropertyDescriptor.h:25
String represents an UTF8 encoded string.
Definition: String.h:33
std::vector< String > Split(value_type delimiter) const
Split the string with a delimiter.
Definition: String.cpp:358
Definition: CommonTools.h:24
Definition: PlatformExtension.h:74