HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
isink.h
Go to the documentation of this file.
1 // Copyright (c) Microsoft Corporation. All rights reserved.
2 // Licensed under the MIT License.
3 
4 #pragma once
5 
6 #include <string>
7 
9 
10 namespace onnxruntime {
11 namespace logging {
12 class ISink {
13  public:
14  ISink() = default;
15 
16  /**
17  Sends the message to the sink.
18  @param timestamp The timestamp.
19  @param logger_id The logger identifier.
20  @param message The captured message.
21  */
22  void Send(const Timestamp& timestamp, const std::string& logger_id, const Capture& message) {
23  SendImpl(timestamp, logger_id, message);
24  }
25 
26  /**
27  Sends a Profiling Event Record to the sink.
28  @param Profiling Event Record
29  */
30  virtual void SendProfileEvent(profiling::EventRecord&) const {};
31 
32  virtual ~ISink() = default;
33 
34  private:
35  // Make Code Analysis happy by disabling all for now. Enable as needed.
36  ORT_DISALLOW_COPY_ASSIGNMENT_AND_MOVE(ISink);
37 
38  virtual void SendImpl(const Timestamp& timestamp, const std::string& logger_id, const Capture& message) = 0;
39 };
40 } // namespace logging
41 } // namespace onnxruntime
GLuint GLsizei const GLchar * message
Definition: glcorearb.h:2543
GLsizei const GLchar *const * string
Definition: glcorearb.h:814
void Send(const Timestamp &timestamp, const std::string &logger_id, const Capture &message)
Definition: isink.h:22
virtual ~ISink()=default
std::chrono::time_point< std::chrono::system_clock > Timestamp
Definition: logging.h:57
virtual void SendProfileEvent(profiling::EventRecord &) const
Definition: isink.h:30