1 /*!
2 	@file
3 	@author		Albert Semenov
4 	@date		07/2012
5 */
6 
7 #ifndef _0228cbb9_aa86_46b7_b23f_3d6ee87da9f9_
8 #define _0228cbb9_aa86_46b7_b23f_3d6ee87da9f9_
9 
10 #include "Data.h"
11 #include "Property.h"
12 
13 namespace tools
14 {
15 	class MYGUI_EXPORT_DLL PropertyUtility
16 	{
17 	public:
18 		static bool isUniqueName(DataPtr _data, const std::string& _propertyName);
19 		static void executeAction(PropertyPtr _property, const std::string& _value, bool _merge = false);
20 
21 		typedef std::pair<PropertyPtr, std::string> PairProprty;
22 		typedef std::vector<PairProprty> VectorPairProperty;
23 		static void storeUniqueNameProperty(const std::string& _propertyName, const std::string& _propertyUnique, DataPtr _parent, VectorPairProperty& _store);
24 		static void restoreUniqueNameProperty(VectorPairProperty& _store);
25 
26 		static PropertyPtr getPropertyByName(const std::string& _dataType, const std::string& _propertyName);
27 		static bool isDataSelected(DataPtr _data);
28 
29 	private:
30 		static PropertyPtr getPropertyByName(DataPtr _data, const std::string& _dataType, const std::string& _propertyName);
31 		static bool isDataSelected(DataPtr _parent, DataPtr _data);
32 	};
33 }
34 
35 #endif
36