Skip to content

Commit 031f25d

Browse files
committed
Add graph tracing functions
1 parent 68d48d6 commit 031f25d

File tree

2 files changed

+79
-2
lines changed

2 files changed

+79
-2
lines changed

Sources/OpenAttributeGraphCxx/Graph/OAGGraphTracing.cpp

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,49 @@ void OAGGraphStartTracing2(_Nullable OAGGraphRef graph, OAGGraphTraceOptions opt
1515
void OAGGraphStopTracing(_Nullable OAGGraphRef graph) {
1616
// TODO
1717
}
18+
19+
void OAGGraphSyncTracing(_Nullable OAGGraphRef graph) {
20+
// TODO
21+
}
22+
23+
CFStringRef OAGGraphCopyTracePath(_Nullable OAGGraphRef graph) {
24+
// TODO
25+
return nullptr;
26+
}
27+
28+
OAGUniqueID OAGGraphAddTrace(OAGGraphRef graph, const OAGTraceRef trace, void *context) {
29+
// TODO
30+
return 0;
31+
}
32+
33+
void OAGGraphRemoveTrace(OAGGraphRef graph, OAGUniqueID trace_id) {
34+
// TODO
35+
}
36+
37+
void OAGGraphSetTrace(OAGGraphRef graph, const OAGTraceRef trace, void *context) {
38+
// TODO
39+
}
40+
41+
void OAGGraphResetTrace(OAGGraphRef graph) {
42+
// TODO
43+
}
44+
45+
bool OAGGraphIsTracingActive(OAGGraphRef graph) {
46+
// TODO
47+
return false;
48+
}
49+
50+
const char *OAGGraphGetTraceEventName(uint32_t event_id) {
51+
// TODO
52+
return nullptr;
53+
}
54+
55+
const char *OAGGraphGetTraceEventSubsystem(uint32_t event_id) {
56+
// TODO
57+
return nullptr;
58+
}
59+
60+
uint32_t OAGGraphRegisterNamedTraceEvent(const char *event_name, const char *event_subsystem) {
61+
// TODO
62+
return 0;
63+
}

Sources/OpenAttributeGraphCxx/include/OpenAttributeGraph/OAGGraphTracing.h

Lines changed: 33 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,44 @@ void OAGGraphStopTracing(_Nullable OAGGraphRef graph) OAG_SWIFT_NAME(OAGGraphRef
4040

4141
OAG_EXPORT
4242
OAG_REFINED_FOR_SWIFT
43-
OAGUniqueID OAGGraphAddTrace(OAGGraphRef graph, const OAGTraceRef trace, void *_Nullable context)
44-
OAG_SWIFT_NAME(OAGGraphRef.addTrace(self:_:context:));
43+
void OAGGraphSyncTracing(_Nullable OAGGraphRef graph) OAG_SWIFT_NAME(OAGGraphRef.syncTracing(_:));
44+
45+
OAG_EXPORT
46+
OAG_REFINED_FOR_SWIFT
47+
CFStringRef OAGGraphCopyTracePath(_Nullable OAGGraphRef graph) OAG_SWIFT_NAME(OAGGraphRef.tracePath(_:));
48+
49+
OAG_EXPORT
50+
OAG_REFINED_FOR_SWIFT
51+
OAGUniqueID OAGGraphAddTrace(OAGGraphRef graph, const OAGTraceRef trace, void *_Nullable context) OAG_SWIFT_NAME(OAGGraphRef.addTrace(self:_:context:));
4552

4653
OAG_EXPORT
4754
OAG_REFINED_FOR_SWIFT
4855
void OAGGraphRemoveTrace(OAGGraphRef graph, OAGUniqueID trace_id) OAG_SWIFT_NAME(OAGGraphRef.removeTrace(self:traceID:));
4956

57+
OAG_EXPORT
58+
OAG_REFINED_FOR_SWIFT
59+
void OAGGraphSetTrace(OAGGraphRef graph, const OAGTraceRef trace, void *_Nullable context) OAG_SWIFT_NAME(OAGGraphRef.setTrace(self:_:context:));
60+
61+
OAG_EXPORT
62+
OAG_REFINED_FOR_SWIFT
63+
void OAGGraphResetTrace(OAGGraphRef graph) OAG_SWIFT_NAME(OAGGraphRef.resetTrace(self:));
64+
65+
OAG_EXPORT
66+
OAG_REFINED_FOR_SWIFT
67+
bool OAGGraphIsTracingActive(OAGGraphRef graph) OAG_SWIFT_NAME(getter:OAGGraphRef.isTracingActive(self:));
68+
69+
OAG_EXPORT
70+
OAG_REFINED_FOR_SWIFT
71+
const char *_Nullable OAGGraphGetTraceEventName(uint32_t event_id) OAG_SWIFT_NAME(OAGGraphRef.traceEventName(for:));
72+
73+
OAG_EXPORT
74+
OAG_REFINED_FOR_SWIFT
75+
const char *_Nullable OAGGraphGetTraceEventSubsystem(uint32_t event_id) OAG_SWIFT_NAME(OAGGraphRef.traceEventSubsystem(for:));
76+
77+
OAG_EXPORT
78+
OAG_REFINED_FOR_SWIFT
79+
uint32_t OAGGraphRegisterNamedTraceEvent(const char *event_name, const char *event_subsystem) OAG_SWIFT_NAME(OAGGraphRef.registerNamedTraceEvent(name:subsystem:));
80+
5081
OAG_EXTERN_C_END
5182

5283
OAG_IMPLICIT_BRIDGING_DISABLED

0 commit comments

Comments
 (0)