~ubuntu-branches/ubuntu/vivid/mygui/vivid

« back to all changes in this revision

Viewing changes to Wrappers/DoxygenWrapper/Data/Managed_Templates/MultiDelegateEvent3.txt

  • Committer: Package Import Robot
  • Author(s): Scott Howard, Bret Curtis, Scott Howard
  • Date: 2014-09-18 17:57:48 UTC
  • mfrom: (1.1.1)
  • Revision ID: package-import@ubuntu.com-20140918175748-dd8va78mvpw1jbes
Tags: 3.2.1-1
[ Bret Curtis ]
* Updated license for majority of files from LGPL to Expat (MIT)

[ Scott Howard ]
* New upstream release
* Updated patch to add build option for system GLEW libraries
* All patches accepted upstream except shared_libraries.patch
* Bumped SONAME due to dropped symbols, updated *.symbols and package
  names
* Updated license of debian/* to Expat with permission of all authors
* Don't install Doxygen autogenerated md5 and map files (thanks
  lintian)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
       public:
 
2
                delegate void Handle#{DelegateName}(
 
3
                        Convert<#{OriginalTypeName1}>::Type #{ValueName1} ,
 
4
                        Convert<#{OriginalTypeName2}>::Type #{ValueName2} ,
 
5
                        Convert<#{OriginalTypeName3}>::Type #{ValueName3} );
 
6
                event Handle#{DelegateName}^ Event#{DelegateName}
 
7
                {
 
8
                        void add(Handle#{DelegateName}^ _value)
 
9
                        {
 
10
                                bool empty = mDelegate#{DelegateName} == nullptr;
 
11
 
 
12
                                mDelegate#{DelegateName} += _value;
 
13
                                MMYGUI_CHECK_NATIVE(mNative);
 
14
 
 
15
                                if (empty)
 
16
                                        static_cast<ThisType*>(mNative)->event#{DelegateName} +=
 
17
                                                static_cast< MyGUI::delegates::IDelegate3<
 
18
                                                        #{OriginalTypeName1} ,
 
19
                                                        #{OriginalTypeName2} ,
 
20
                                                        #{OriginalTypeName3} > *>(
 
21
                                                                new Delegate3< Handle#{DelegateName}^ ,
 
22
                                                                #{OriginalTypeName1} ,
 
23
                                                                #{OriginalTypeName2} ,
 
24
                                                                #{OriginalTypeName3} >(mDelegate#{DelegateName}) );
 
25
                        }
 
26
                        void remove(Handle#{DelegateName}^ _value)
 
27
                        {
 
28
                                mDelegate#{DelegateName} -= _value;
 
29
                                MMYGUI_CHECK_NATIVE(mNative);
 
30
                                
 
31
                                bool empty = mDelegate#{DelegateName} == nullptr;
 
32
                                
 
33
                                if (empty)
 
34
                                        static_cast<ThisType*>(mNative)->event#{DelegateName} -=
 
35
                                                static_cast< MyGUI::delegates::IDelegate3<
 
36
                                                        #{OriginalTypeName1} ,
 
37
                                                        #{OriginalTypeName2} ,
 
38
                                                        #{OriginalTypeName3} > *>(
 
39
                                                                new Delegate3< Handle#{DelegateName}^ ,
 
40
                                                                        #{OriginalTypeName1} ,
 
41
                                                                        #{OriginalTypeName2} ,
 
42
                                                                        #{OriginalTypeName3} >(mDelegate#{DelegateName}) );
 
43
                        }
 
44
                }
 
45
        private:
 
46
                Handle#{DelegateName}^ mDelegate#{DelegateName};