1 #ifndef __DALI_INTERNAL_EXAMPLE_CLASS_H__
2 #define __DALI_INTERNAL_EXAMPLE_CLASS_H__
5 // Copyright (c) 2014 Samsung Electronics Co., Ltd.
7 // Licensed under the Flora License, Version 1.0 (the License);
8 // you may not use this file except in compliance with the License.
9 // You may obtain a copy of the License at
11 // http://floralicense.org/license/
13 // Unless required by applicable law or agreed to in writing, software
14 // distributed under the License is distributed on an AS IS BASIS,
15 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 // See the License for the specific language governing permissions and
17 // limitations under the License.
25 #include <dali/public-api/core/actors/actor.h>
30 // Forward declarations for the Dali namespace
36 // Forward declarations for the Dali::Internal namespace
40 * TODO - Rewrite this comment, to explain the purpose of your class
42 class ExampleClass : public ExampleBaseClass
46 typedef std::list<XXXX> ExampleContainer;
50 FirstValue = 0, ///< First value description
51 SecondValue = 1 ///< Second value description
54 public: // Construction
57 * Create an ExampleClass.
62 * Create an ExampleClass with a name.
63 * @param[in] The name of the example class.
65 ExampleClass(const std::string& name);
68 * Virtual destructor; ExampleClass is intended as a base class.
70 virtual ~ExampleClass();
72 public: // Public members
75 * Set the name of an ExampleClass.
76 * @pre TODO - Edit this example comment.
77 * @param[in] The new name.
78 * @post TODO - Edit this example comment.
83 * Retreive the name of an ExampleClass.
84 * @pre TODO - Edit this example comment.
85 * @return The name of the example class.
86 * @post TODO - Edit this example comment.
88 std::string GetName() const { return mName; }
90 protected: // Protected members
93 * Example helper method, which is accessible by derived classes.
94 * @param [in] exampleParam An an example parameter.
96 void HelperMember(ExampleEnum exampleParam);
98 private: // Private members
101 * Undefined copy constructor; declaring this prevents accidental copying.
102 * @param[in] A reference to the ExampleClass to copy.
104 ExampleClass(const ExampleClass&);
107 * Undefined assignment operator; declaring this prevents accidental copying.
108 * @param[in] A reference to the ExampleClass to copy.
109 * @return A reference to the copied ExampleClass.
111 ExampleClass& operator=(const ExampleClass& rhs);
114 * Example pure virtual member.
115 * The intention here is to avoid making the public SetName() virtual.
116 * When the name changes, derived classes receive this notification.
118 virtual void OnNameSet() = 0;
120 protected: // Protected data
122 ExampleContainer mContainer;
124 private: // Private data
129 } // namespace Internal
131 // Helpers for public-api forwarding methods
133 inline Internal::ExampleClass& GetImplementation(Dali::ExampleClass& example)
135 DALI_ASSERT(example);
137 BaseObject& handle = example.GetBaseObject();
139 return static_cast<Internal::ExampleClass&>(handle);
142 inline const Internal::ExampleClass& GetImplementation(const Dali::ExampleClass& example)
144 DALI_ASSERT(example);
146 const BaseObject& handle = example.GetBaseObject();
148 return static_cast<const Internal::ExampleClass&>(handle);
153 #endif // __DALI_INTERNAL_EXAMPLE_CLASS_H__