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 shortDescription = shortDescription_;
125 dimension = dimension_;
133 category = category_;
146 helpPath = helpPath_;
264 std::shared_ptr<gd::ObjectConfiguration> instance);
302 std::shared_ptr<gd::Behavior> instance,
303 std::shared_ptr<gd::BehaviorsSharedData> sharedDatasInstance);
319 std::shared_ptr<gd::BaseEvent> instance);
363 return extensionPropertiesMetadata[name];
372 return instructionOrExpressionGroupMetadata[name];
379 void StripUnimplementedInstructionsAndExpressions();
387 inGameEditorResources.push_back(newInGameEditorResource);
388 return inGameEditorResources.back();
452 const std::vector<gd::String>&
GetTags()
const {
return tags; }
459 tags = csvTags.
Split(
',');
460 for (
size_t i = 0; i < tags.size(); i++) {
461 tags[i] = tags[i].Trim().LowerCase();
490 std::vector<gd::String> GetExtensionObjectsTypes()
const;
496 std::vector<gd::String> GetBehaviorsTypes()
const;
502 CreateFunPtr GetObjectCreationFunctionPtr(
const gd::String& objectType)
const;
508 std::vector<gd::String> GetExtensionEffectTypes()
const;
515 std::shared_ptr<gd::BaseEvent> CreateEvent(
const gd::String& eventType)
const;
548 bool HasBehavior(
const gd::String& behaviorType)
const;
558 std::map<gd::String, gd::EventMetadata>& GetAllEvents();
564 std::map<gd::String, gd::InstructionMetadata>& GetAllActions();
569 std::map<gd::String, gd::InstructionMetadata>& GetAllConditions();
574 std::map<gd::String, gd::ExpressionMetadata>& GetAllExpressions();
579 std::map<gd::String, gd::ExpressionMetadata>& GetAllStrExpressions();
585 std::vector<gd::DependencyMetadata>& GetAllDependencies();
591 const std::vector<gd::DependencyMetadata>& GetAllDependencies()
const;
597 std::vector<gd::SourceFileMetadata>& GetAllSourceFiles();
603 const std::vector<gd::SourceFileMetadata>& GetAllSourceFiles()
const;
609 std::map<gd::String, gd::InstructionMetadata>& GetAllActionsForObject(
615 std::map<gd::String, gd::InstructionMetadata>& GetAllConditionsForObject(
621 std::map<gd::String, gd::ExpressionMetadata>& GetAllExpressionsForObject(
627 std::map<gd::String, gd::ExpressionMetadata>& GetAllStrExpressionsForObject(
633 std::map<gd::String, gd::InstructionMetadata>& GetAllActionsForBehavior(
639 std::map<gd::String, gd::InstructionMetadata>& GetAllConditionsForBehavior(
645 std::map<gd::String, gd::ExpressionMetadata>& GetAllExpressionsForBehavior(
651 std::map<gd::String, gd::ExpressionMetadata>& GetAllStrExpressionsForBehavior(
660 return extensionPropertiesMetadata;
667 const std::map<gd::String, InstructionOrExpressionGroupMetadata>&
669 return instructionOrExpressionGroupMetadata;
672 const std::vector<gd::InGameEditorResourceMetadata>& GetInGameEditorResources()
const {
673 return inGameEditorResources;
686 static gd::String GetBehaviorEventsFunctionFullType(
698 static gd::String GetObjectEventsFunctionFullType(
738 std::vector<gd::String> tags;
740 std::map<gd::String, gd::ObjectMetadata> objectsInfos;
741 std::map<gd::String, gd::BehaviorMetadata> behaviorsInfo;
742 std::map<gd::String, gd::EffectMetadata> effectsMetadata;
743 std::map<gd::String, gd::InstructionMetadata> conditionsInfos;
744 std::map<gd::String, gd::InstructionMetadata> actionsInfos;
745 std::map<gd::String, gd::ExpressionMetadata> expressionsInfos;
746 std::map<gd::String, gd::ExpressionMetadata> strExpressionsInfos;
747 std::vector<gd::DependencyMetadata> extensionDependenciesMetadata;
748 std::vector<gd::SourceFileMetadata> extensionSourceFilesMetadata;
749 std::map<gd::String, gd::EventMetadata> eventsInfos;
750 std::map<gd::String, gd::PropertyDescriptor> extensionPropertiesMetadata;
751 std::map<gd::String, InstructionOrExpressionGroupMetadata>
752 instructionOrExpressionGroupMetadata;
753 std::vector<gd::InGameEditorResourceMetadata> inGameEditorResources;
758 static std::map<gd::String, gd::InstructionMetadata>
759 badConditionsMetadata;
761 static std::map<gd::String, gd::InstructionMetadata>
764 static std::map<gd::String, gd::ExpressionMetadata>
765 badExpressionsMetadata;
774 #define GD_COMPLETE_EXTENSION_COMPILATION_INFORMATION() \
775 compilationInfo.runtimeOnly = false; \
776 compilationInfo.sfmlMajorVersion = 2; \
777 compilationInfo.sfmlMinorVersion = 0; \
778 compilationInfo.gdCoreVersion = GD_VERSION_STRING; \
779 compilationInfo.sizeOfpInt = sizeof(int*); \
780 compilationInfo.gccMajorVersion = __GNUC__; \
781 compilationInfo.gccMinorVersion = __GNUC_MINOR__; \
782 compilationInfo.gccPatchLevel = __GNUC_PATCHLEVEL__; \
783 compilationInfo.informationCompleted = true;
785 #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