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/Extensions/Metadata/SourceFileMetadata.h"
21 #include "GDCore/Project/PropertyDescriptor.h"
22 #include "GDCore/String.h"
23 #include "GDCore/Tools/VersionPriv.h"
27 class InstructionMetadata;
28 class MultipleInstructionMetadata;
29 class ExpressionMetadata;
31 class BehaviorMetadata;
33 class DependencyMetadata;
36 class EventCodeGenerator;
37 class ArbitraryResourceWorker;
38 class BehaviorsSharedData;
41 class ObjectConfiguration;
44 typedef std::function<std::unique_ptr<gd::ObjectConfiguration>()> CreateFunPtr;
57 bool informationCompleted =
false;
59 bool runtimeOnly =
false;
63 int gccMajorVersion = 0;
64 int gccMinorVersion = 0;
65 int gccPatchLevel = 0;
68 int sfmlMajorVersion = 0;
69 int sfmlMinorVersion = 0;
117 category = category_;
130 helpPath = helpPath_;
248 std::shared_ptr<gd::ObjectConfiguration> instance);
286 std::shared_ptr<gd::Behavior> instance,
287 std::shared_ptr<gd::BehaviorsSharedData> sharedDatasInstance);
303 std::shared_ptr<gd::BaseEvent> instance);
347 return extensionPropertiesMetadata[name];
356 return instructionOrExpressionGroupMetadata[name];
363 void StripUnimplementedInstructionsAndExpressions();
371 inGameEditorResources.push_back(newInGameEditorResource);
372 return inGameEditorResources.back();
426 const std::vector<gd::String>&
GetTags()
const {
return tags; }
433 tags = csvTags.
Split(
',');
434 for (
size_t i = 0; i < tags.size(); i++) {
435 tags[i] = tags[i].Trim().LowerCase();
464 std::vector<gd::String> GetExtensionObjectsTypes()
const;
470 std::vector<gd::String> GetBehaviorsTypes()
const;
476 CreateFunPtr GetObjectCreationFunctionPtr(
const gd::String& objectType)
const;
482 std::vector<gd::String> GetExtensionEffectTypes()
const;
489 std::shared_ptr<gd::BaseEvent> CreateEvent(
const gd::String& eventType)
const;
522 bool HasBehavior(
const gd::String& behaviorType)
const;
532 std::map<gd::String, gd::EventMetadata>& GetAllEvents();
538 std::map<gd::String, gd::InstructionMetadata>& GetAllActions();
543 std::map<gd::String, gd::InstructionMetadata>& GetAllConditions();
548 std::map<gd::String, gd::ExpressionMetadata>& GetAllExpressions();
553 std::map<gd::String, gd::ExpressionMetadata>& GetAllStrExpressions();
559 std::vector<gd::DependencyMetadata>& GetAllDependencies();
565 const std::vector<gd::DependencyMetadata>& GetAllDependencies()
const;
571 std::vector<gd::SourceFileMetadata>& GetAllSourceFiles();
577 const std::vector<gd::SourceFileMetadata>& GetAllSourceFiles()
const;
583 std::map<gd::String, gd::InstructionMetadata>& GetAllActionsForObject(
589 std::map<gd::String, gd::InstructionMetadata>& GetAllConditionsForObject(
595 std::map<gd::String, gd::ExpressionMetadata>& GetAllExpressionsForObject(
601 std::map<gd::String, gd::ExpressionMetadata>& GetAllStrExpressionsForObject(
607 std::map<gd::String, gd::InstructionMetadata>& GetAllActionsForBehavior(
613 std::map<gd::String, gd::InstructionMetadata>& GetAllConditionsForBehavior(
619 std::map<gd::String, gd::ExpressionMetadata>& GetAllExpressionsForBehavior(
625 std::map<gd::String, gd::ExpressionMetadata>& GetAllStrExpressionsForBehavior(
634 return extensionPropertiesMetadata;
641 const std::map<gd::String, InstructionOrExpressionGroupMetadata>&
643 return instructionOrExpressionGroupMetadata;
646 const std::vector<gd::InGameEditorResourceMetadata>& GetInGameEditorResources()
const {
647 return inGameEditorResources;
660 static gd::String GetBehaviorEventsFunctionFullType(
672 static gd::String GetObjectEventsFunctionFullType(
710 std::vector<gd::String> tags;
712 std::map<gd::String, gd::ObjectMetadata> objectsInfos;
713 std::map<gd::String, gd::BehaviorMetadata> behaviorsInfo;
714 std::map<gd::String, gd::EffectMetadata> effectsMetadata;
715 std::map<gd::String, gd::InstructionMetadata> conditionsInfos;
716 std::map<gd::String, gd::InstructionMetadata> actionsInfos;
717 std::map<gd::String, gd::ExpressionMetadata> expressionsInfos;
718 std::map<gd::String, gd::ExpressionMetadata> strExpressionsInfos;
719 std::vector<gd::DependencyMetadata> extensionDependenciesMetadata;
720 std::vector<gd::SourceFileMetadata> extensionSourceFilesMetadata;
721 std::map<gd::String, gd::EventMetadata> eventsInfos;
722 std::map<gd::String, gd::PropertyDescriptor> extensionPropertiesMetadata;
723 std::map<gd::String, InstructionOrExpressionGroupMetadata>
724 instructionOrExpressionGroupMetadata;
725 std::vector<gd::InGameEditorResourceMetadata> inGameEditorResources;
730 static std::map<gd::String, gd::InstructionMetadata>
731 badConditionsMetadata;
733 static std::map<gd::String, gd::InstructionMetadata>
736 static std::map<gd::String, gd::ExpressionMetadata>
737 badExpressionsMetadata;
746 #define GD_COMPLETE_EXTENSION_COMPILATION_INFORMATION() \
747 compilationInfo.runtimeOnly = false; \
748 compilationInfo.sfmlMajorVersion = 2; \
749 compilationInfo.sfmlMinorVersion = 0; \
750 compilationInfo.gdCoreVersion = GD_VERSION_STRING; \
751 compilationInfo.sizeOfpInt = sizeof(int*); \
752 compilationInfo.gccMajorVersion = __GNUC__; \
753 compilationInfo.gccMinorVersion = __GNUC_MINOR__; \
754 compilationInfo.gccPatchLevel = __GNUC_PATCHLEVEL__; \
755 compilationInfo.informationCompleted = true;
757 #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:23
Class used by gd::PlatformExtension to ensure that an extension is compiled against the right version...
Definition: PlatformExtension.h:52
Used to describe a property shown in a property grid.
Definition: PropertyDescriptor.h:38
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:75