HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DEP_DirtyAlertMicroNode.h
Go to the documentation of this file.
1 /*
2  * PROPRIETARY INFORMATION. This software is proprietary to
3  * Side Effects Software Inc., and is not to be reproduced,
4  * transmitted, or disclosed in any way without written permission.
5  *
6  * NAME: DEP_MicroNode.h (DEP Library, C++)
7  *
8  * COMMENTS:
9  */
10 
11 #ifndef __DEP_DIRTYALERTMICRONODE_H__
12 #define __DEP_DIRTYALERTMICRONODE_H__
13 
14 #include "DEP_API.h"
15 #include "DEP_MicroNode.h"
16 
17 // Very simple micronode "end point" that can execute a function whenever
18 // any inputs to this micro node become dirty. It is still up to the creator
19 // to manage any inputs to this micro node, including re-establishing inputs
20 // every time the callback occurs.
21 //
22 // Do not export this class, it is purely inline.
23 template<class FuncType>
25 {
26 public:
27  DEP_DirtyAlertMicroNode(FuncType dirty_callback)
28  : myDirtyCallback(dirty_callback)
29  { }
30 
32  const DEP_PropagateData &prop_data) override
33  { myDirtyCallback(); }
34 
35 private:
36  FuncType myDirtyCallback;
37 };
38 
39 #endif // __DEP_DIRTYALERTMICRONODE_H__
void becameDirty(DEP_MicroNode &src, const DEP_PropagateData &prop_data) override
DEP_DirtyAlertMicroNode(FuncType dirty_callback)
Propagation info for a dep micro node.
Definition: DEP_MicroNode.h:36
GLenum src
Definition: glcorearb.h:1793