Browse Source

Using explicit namespace in ClassFactory macros.

David Piuva 2 years ago
parent
commit
d39de7b9ae
1 changed files with 10 additions and 10 deletions
  1. 10 10
      Source/DFPSR/persistent/ClassFactory.h

+ 10 - 10
Source/DFPSR/persistent/ClassFactory.h

@@ -40,27 +40,27 @@ inline std::shared_ptr<Persistent> classConstructor() {
 
 
 // Must be used in each class inheriting from Persistent (both directly and indirectly)
 // Must be used in each class inheriting from Persistent (both directly and indirectly)
 #define PERSISTENT_DECLARATION(CLASS) \
 #define PERSISTENT_DECLARATION(CLASS) \
-	std::shared_ptr<StructureDefinition> getStructure() const override; \
-	decltype(&classConstructor) getConstructor() const override; \
-	explicit CLASS(const ReadableString &content, const ReadableString &fromPath);
+	std::shared_ptr<dsr::StructureDefinition> getStructure() const override; \
+	decltype(&dsr::classConstructor) getConstructor() const override; \
+	explicit CLASS(const dsr::ReadableString &content, const dsr::ReadableString &fromPath);
 
 
 // Must be used in the implementation of each class inheriting from Persistent
 // Must be used in the implementation of each class inheriting from Persistent
 #define PERSISTENT_DEFINITION(CLASS) \
 #define PERSISTENT_DEFINITION(CLASS) \
-	std::shared_ptr<StructureDefinition> CLASS##Type; \
-	std::shared_ptr<StructureDefinition> CLASS::getStructure() const { \
+	std::shared_ptr<dsr::StructureDefinition> CLASS##Type; \
+	std::shared_ptr<dsr::StructureDefinition> CLASS::getStructure() const { \
 		if (CLASS##Type.get() == nullptr) { \
 		if (CLASS##Type.get() == nullptr) { \
-			CLASS##Type = std::make_shared<StructureDefinition>(U ## #CLASS); \
+			CLASS##Type = std::make_shared<dsr::StructureDefinition>(U ## #CLASS); \
 			this->declareAttributes(*(CLASS##Type)); \
 			this->declareAttributes(*(CLASS##Type)); \
 		} \
 		} \
 		return CLASS##Type; \
 		return CLASS##Type; \
 	} \
 	} \
-	CLASS::CLASS(const ReadableString &content, const ReadableString &fromPath) { \
+	CLASS::CLASS(const dsr::ReadableString &content, const dsr::ReadableString &fromPath) { \
 		this->assignValue(content, fromPath); \
 		this->assignValue(content, fromPath); \
 	} \
 	} \
-	std::shared_ptr<Persistent> CLASS##Constructor() { \
-		return std::dynamic_pointer_cast<Persistent>(std::make_shared<CLASS>()); \
+	std::shared_ptr<dsr::Persistent> CLASS##Constructor() { \
+		return std::dynamic_pointer_cast<dsr::Persistent>(std::make_shared<CLASS>()); \
 	} \
 	} \
-	decltype(&classConstructor) CLASS::getConstructor() const { \
+	decltype(&dsr::classConstructor) CLASS::getConstructor() const { \
 		return &CLASS##Constructor; \
 		return &CLASS##Constructor; \
 	}
 	}