-
Notifications
You must be signed in to change notification settings - Fork 928
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow to make custom objects private to an extension (#7275)
- Loading branch information
Showing
23 changed files
with
196 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,8 +3,7 @@ | |
* Copyright 2008-2016 Florian Rival ([email protected]). All rights | ||
* reserved. This project is released under the MIT License. | ||
*/ | ||
#ifndef GDCORE_ABSTRACTEVENTSBASEDENTITY_H | ||
#define GDCORE_ABSTRACTEVENTSBASEDENTITY_H | ||
#pragma once | ||
|
||
#include <vector> | ||
#include "GDCore/Project/NamedPropertyDescriptor.h" | ||
|
@@ -40,6 +39,21 @@ class GD_CORE_API AbstractEventsBasedEntity { | |
*/ | ||
AbstractEventsBasedEntity* Clone() const { return new AbstractEventsBasedEntity(*this); }; | ||
|
||
/** | ||
* \brief Check if the behavior or object is private - it can't be used outside of its | ||
* extension. | ||
*/ | ||
bool IsPrivate() const { return isPrivate; } | ||
|
||
/** | ||
* \brief Set that the behavior or object is private - it can't be used outside of its | ||
* extension. | ||
*/ | ||
AbstractEventsBasedEntity& SetPrivate(bool isPrivate_) { | ||
isPrivate = isPrivate_; | ||
return *this; | ||
} | ||
|
||
/** | ||
* \brief Get the description of the behavior or object, that is displayed in the | ||
* editor. | ||
|
@@ -151,8 +165,7 @@ class GD_CORE_API AbstractEventsBasedEntity { | |
gd::EventsFunctionsContainer eventsFunctionsContainer; | ||
gd::PropertiesContainer propertyDescriptors; | ||
gd::String extensionName; | ||
bool isPrivate = false; | ||
}; | ||
|
||
} // namespace gd | ||
|
||
#endif // GDCORE_ABSTRACTEVENTSBASEDENTITY_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,8 +3,7 @@ | |
* Copyright 2008-2016 Florian Rival ([email protected]). All rights | ||
* reserved. This project is released under the MIT License. | ||
*/ | ||
#ifndef GDCORE_EVENTSBASEDBEHAVIOR_H | ||
#define GDCORE_EVENTSBASEDBEHAVIOR_H | ||
#pragma once | ||
|
||
#include <vector> | ||
#include "GDCore/Project/AbstractEventsBasedEntity.h" | ||
|
@@ -75,17 +74,11 @@ class GD_CORE_API EventsBasedBehavior: public AbstractEventsBasedEntity { | |
} | ||
|
||
/** | ||
* \brief Check if the behavior is private - it can't be used outside of its | ||
* \brief Set that the behavior or object is private - it can't be used outside of its | ||
* extension. | ||
*/ | ||
bool IsPrivate() const { return isPrivate; } | ||
|
||
/** | ||
* \brief Set that the behavior is private - it can't be used outside of its | ||
* extension. | ||
*/ | ||
EventsBasedBehavior& SetPrivate(bool _isPrivate) { | ||
isPrivate = _isPrivate; | ||
EventsBasedBehavior& SetPrivate(bool isPrivate) { | ||
AbstractEventsBasedEntity::SetPrivate(isPrivate); | ||
return *this; | ||
} | ||
|
||
|
@@ -149,11 +142,8 @@ class GD_CORE_API EventsBasedBehavior: public AbstractEventsBasedEntity { | |
|
||
private: | ||
gd::String objectType; | ||
bool isPrivate = false; | ||
gd::PropertiesContainer sharedPropertyDescriptors; | ||
QuickCustomization::Visibility quickCustomizationVisibility; | ||
}; | ||
|
||
} // namespace gd | ||
|
||
#endif // GDCORE_EVENTSBASEDBEHAVIOR_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.