1 #ifndef __GROUP_TRANSFORM__
2 #define __GROUP_TRANSFORM__
6 #include "TransformFactory.h"
8 extern CFStringRef kSecGroupTransformType
;
10 class GroupTransform
: public Transform
13 std::string
DebugDescription();
14 virtual void FinalizePhase2();
15 virtual bool validConnectionPoint(CFStringRef attributeName
);
17 CFMutableArrayRef mMembers
;
18 dispatch_group_t mAllChildrenFinalized
;
19 dispatch_group_t mPendingStartupActivity
;
21 void RecurseForAllNodes(dispatch_group_t group
, CFErrorRef
*errorOut
, bool parallel
, bool opExecutesOnGroups
, Transform::TransformOperation op
);
24 virtual ~GroupTransform();
26 static CFTypeRef
Make();
27 static TransformFactory
* MakeTransformFactory();
29 static CFTypeID
GetCFTypeID();
31 void AddMemberToGroup(SecTransformRef member
);
32 void RemoveMemberFromGroup(SecTransformRef member
);
33 bool HasMember(SecTransformRef member
);
35 void AddAllChildrenFinalizedCallback(dispatch_queue_t run_on
, dispatch_block_t callback
);
36 void ChildStartedFinalization(Transform
*child
);
38 SecTransformRef
FindFirstTransform(); // defined as the transform to which input is attached
39 SecTransformRef
FindLastTransform(); // defined as the transform to which the monitor is attached
40 SecTransformRef
FindMonitor();
41 SecTransformRef
GetAnyMember();
43 SecTransformRef
FindByName(CFStringRef name
);
45 // A group should delay destruction while excution is starting
46 void StartingExecutionInGroup();
47 void StartedExecutionInGroup(bool succesful
);
49 virtual CFDictionaryRef
Externalize(CFErrorRef
* error
);
51 CFErrorRef
ForAllNodes(bool parallel
, bool opExecutesOnGroups
, Transform::TransformOperation op
);
52 void ForAllNodesAsync(bool opExecutesOnGroups
, dispatch_group_t group
, Transform::TransformAsyncOperation op
);
54 CFStringRef
DotForDebugging();