X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=dali-toolkit%2Finternal%2Fbuilder%2Fbuilder-impl.h;h=3051917ceab5ea6e45457af14b6e1d9522c4c127;hp=4c018aafb85f3344e17460f69e4257b9e5cc7e1c;hb=3dce4163d27820a63fedb91ad4628efc3f864152;hpb=1770d0f68a05d545757fc8050333c0c9c4be96c9 diff --git a/dali-toolkit/internal/builder/builder-impl.h b/dali-toolkit/internal/builder/builder-impl.h index 4c018aa..3051917 100644 --- a/dali-toolkit/internal/builder/builder-impl.h +++ b/dali-toolkit/internal/builder/builder-impl.h @@ -28,6 +28,7 @@ #include #include #include +#include #include // INTERNAL INCLUDES @@ -219,94 +220,123 @@ protected: virtual ~Builder(); private: - // Undefined - Builder(const Builder&); - Builder& operator=(const Builder& rhs); - - void SetupTask( RenderTask& task, const Toolkit::TreeNode& node, const Replacement& replacement ); - - void SetCustomProperties( const TreeNode& node, Handle& handle, const Replacement& constant, const std::string& childName, Property::AccessMode accessMode ); - -private: - Toolkit::JsonParser mParser; - - typedef std::map ImageLut; - ImageLut mFrameBufferImageLut; - - typedef std::map PathLut; - PathLut mPathLut; - + typedef std::vector KeyStack; + typedef std::vector< TreeNode::KeyNodePair > MappingsLut; + typedef struct{ std::string name; Dali::LinearConstrainer linearConstrainer; } LinearConstrainerEntry; + typedef std::vector LinearConstrainerLut; typedef struct{ std::string name; Dali::PathConstrainer pathConstrainer; } PathConstrainerEntry; typedef std::vector PathConstrainerLut; - PathConstrainerLut mPathConstrainerLut; + typedef std::map PathLut; + typedef std::map ImageLut; - typedef struct{ std::string name; Dali::LinearConstrainer linearConstrainer; } LinearConstrainerEntry; - typedef std::vector LinearConstrainerLut; - LinearConstrainerLut mLinearConstrainerLut; +private: + // Undefined + Builder(const Builder&); - SlotDelegate mSlotDelegate; + // Undefined + Builder& operator=(const Builder& rhs); - Property::Map mReplacementMap; + void LoadConstants( const TreeNode& root, Property::Map& intoMap ); - typedef std::vector< TreeNode::KeyNodePair > MappingsLut; - MappingsLut mCompleteMappings; + Animation CreateAnimation( const std::string& animationName, + const Replacement& replacement, + Dali::Actor sourceActor ); - BaseHandle Create( const std::string& templateName, const Replacement& constant ); + BaseHandle Create( const std::string& templateName, + const Replacement& constant ); - BaseHandle DoCreate( const TreeNode& root, const TreeNode& node, Actor parent, const Replacement& replacements ); + BaseHandle DoCreate( const TreeNode& root, + const TreeNode& node, + Actor parent, + const Replacement& replacements ); - void LoadConstants( const TreeNode& root, Property::Map& intoMap ); + void SetupTask( RenderTask& task, + const Toolkit::TreeNode& node, + const Replacement& replacement ); - void LoadIncludes( const std::string& data ); + bool ApplyStyle( const std::string& styleName, + Handle& handle, + const Replacement& replacement); - bool ApplyStyle( const std::string& styleName, Handle& handle, const Replacement& replacement); + void ApplyAllStyleProperties( const TreeNode& root, + const TreeNode& node, + Dali::Handle& handle, + const Replacement& constant ); - Animation CreateAnimation( const std::string& animationName, const Replacement& replacement, Dali::Actor sourceActor ); + void ApplyProperties( const TreeNode& root, + const TreeNode& node, + Dali::Handle& handle, + const Replacement& constant ); - typedef std::vector KeyStack; + void ApplyStylesByActor( const TreeNode& root, + const TreeNode& node, + Dali::Handle& handle, + const Replacement& constant ); + + void SetProperties( const TreeNode& node, + Handle& handle, + const Replacement& constant ); /** - * Tests if the value is a string delimited by <>. If it is, then it attempts to - * change the value to the mapping from a matching key in the mappings table. + * Find the key in the mapping table, if it's present, then generate + * a property value for it (of the given type if available), + * recursing as necessary, and stopping if any cycles are detected. + * * @param[in] mappingRoot The JSON node containing the mappings - * @param[in,out] keyStack the stack of visited keys + * @param[in] theKey The key to search for + * @param[in] propertyType The property type if known, or NONE * @param[in,out] value The string value to test and write back to. - * @return true if the value was converted, false otherwise. */ - bool ConvertChildValue( const TreeNode& mappingRoot, KeyStack& keyStack, Property::Value& value ); + bool GetPropertyMap( const TreeNode& mappingRoot, + const char* theKey, + Property::Type propertyType, + Property::Value& value ); + + void SetCustomProperties( const TreeNode& node, + Handle& handle, + const Replacement& constant, + const std::string& childName, + Property::AccessMode accessMode ); /** - * Find the key in the mapping table, if it's present, then generate a property value for it (of the given type if available), recursing as necessary, and stopping if any cycles - * are detected. + * Find the key in the mapping table, if it's present, then generate + * a property value for it (of the given type if available), + * recursing as necessary, and stopping if any cycles are detected. + * * @param[in] mappingRoot The JSON node containing the mappings * @param[in] theKey The key to search for * @param[in,out] keyStack the stack of visited keys * @param[in] propertyType The property type if known, or NONE * @param[in,out] value The string value to test and write back to. */ - bool RecursePropertyMap( const TreeNode& mappingRoot, KeyStack& keyStack, const char* theKey, Property::Type propertyType, Property::Value& value ); + bool RecursePropertyMap( const TreeNode& mappingRoot, + KeyStack& keyStack, + const char* theKey, + Property::Type propertyType, + Property::Value& value ); + /** - * Find the key in the mapping table, if it's present, then generate a property value for it (of the given type if available), recursing as necessary, and stopping if any cycles - * are detected. + * Tests if the value is a string delimited by <>. If it is, then it attempts to + * change the value to the mapping from a matching key in the mappings table. * @param[in] mappingRoot The JSON node containing the mappings - * @param[in] theKey The key to search for - * @param[in] propertyType The property type if known, or NONE + * @param[in,out] keyStack the stack of visited keys * @param[in,out] value The string value to test and write back to. + * @return true if the value was converted, false otherwise. */ - bool GetPropertyMap( const TreeNode& mappingRoot, const char* theKey, Property::Type propertyType, Property::Value& value ); - - void ApplyProperties( const TreeNode& root, const TreeNode& node, - Dali::Handle& handle, const Replacement& constant ); - - void ApplyStylesByActor( const TreeNode& root, const TreeNode& node, - Dali::Handle& handle, const Replacement& constant ); - - void ApplyAllStyleProperties( const TreeNode& root, const TreeNode& node, - Dali::Handle& handle, const Replacement& constant ); - - void SetProperties( const TreeNode& node, Handle& handle, const Replacement& constant ); + bool ConvertChildValue( const TreeNode& mappingRoot, + KeyStack& keyStack, + Property::Value& value ); +private: + Toolkit::JsonParser mParser; + ImageLut mFrameBufferImageLut; + PathLut mPathLut; + PathConstrainerLut mPathConstrainerLut; + LinearConstrainerLut mLinearConstrainerLut; + SlotDelegate mSlotDelegate; + Property::Map mReplacementMap; + MappingsLut mCompleteMappings; Toolkit::Builder::BuilderSignalType mQuitSignal; };