Lines Matching defs:std

40 const std::string LINE_SEPARATOR = "\n";
43 std::string file_ {""};
45 std::string func_ {""};
46 std::string dfxName_ {""};
48 Caller(std::string file = __builtin_FILE(), int line = __builtin_LINE(),
49 std::string func = __builtin_FUNCTION())
54 std::string ToString() const
57 return std::string("[ ]");
60 if (split == std::string::npos) {
63 std::string caller("[" + file_.substr(split + 1) + "(" + func_ + ":" + std::to_string(line_) +
78 using Clock = std::chrono::steady_clock;
79 using TimePoint = std::chrono::time_point<Clock>;
80 using Callback = std::function<void()>;
81 using Pointer = std::unique_ptr<InnerEvent, void (*)(InnerEvent *)>;
82 using EventId = std::variant<uint32_t, std::string>;
125 static inline Pointer Get(uint32_t innerEventId, const std::shared_ptr<T> &object,
143 static inline Pointer Get(const EventId &innerEventId, const std::shared_ptr<T> &object,
161 static inline Pointer Get(uint32_t innerEventId, const std::weak_ptr<T> &object,
179 static inline Pointer Get(const EventId &innerEventId, const std::weak_ptr<T> &object,
197 static inline Pointer Get(uint32_t innerEventId, std::unique_ptr<T, D> &&object,
215 static inline Pointer Get(const EventId &innerEventId, std::unique_ptr<T, D> &&object,
233 static inline Pointer Get(uint32_t innerEventId, std::unique_ptr<T, D> &object,
251 static inline Pointer Get(const EventId &innerEventId, std::unique_ptr<T, D> &object,
269 static inline Pointer Get(uint32_t innerEventId, int64_t param, const std::shared_ptr<T> &object,
287 static inline Pointer Get(const EventId &innerEventId, int64_t param, const std::shared_ptr<T> &object,
305 static inline Pointer Get(uint32_t innerEventId, int64_t param, const std::weak_ptr<T> &object,
323 static inline Pointer Get(const EventId &innerEventId, int64_t param, const std::weak_ptr<T> &object,
341 static inline Pointer Get(uint32_t innerEventId, int64_t param, std::unique_ptr<T, D> &&object,
359 static inline Pointer Get(const EventId &innerEventId, int64_t param, std::unique_ptr<T, D> &&object,
377 static inline Pointer Get(uint32_t innerEventId, int64_t param, std::unique_ptr<T, D> &object,
395 static inline Pointer Get(const EventId &innerEventId, int64_t param, std::unique_ptr<T, D> &object,
411 static Pointer Get(const Callback &callback, const std::string &name = std::string(),
426 inline std::shared_ptr<EventHandler> GetOwner() const
436 inline std::weak_ptr<EventHandler> GetWeakOwner() const
446 inline void SetOwner(const std::shared_ptr<EventHandler> &owner)
522 return std::get<uint32_t>(innerEventId_);
553 std::shared_ptr<T> GetSharedObject() const
555 const std::shared_ptr<T> &sharedObject = *reinterpret_cast<const std::shared_ptr<T> *>(smartPtr_);
560 const std::weak_ptr<T> &weakObject = *reinterpret_cast<const std::weak_ptr<T> *>(smartPtr_);
575 std::unique_ptr<T> GetUniqueObject() const
577 std::unique_ptr<T> &object = *reinterpret_cast<std::unique_ptr<T> *>(smartPtr_);
579 return std::move(object);
592 std::unique_ptr<T, D> GetUniqueObject() const
594 std::unique_ptr<T, D> &object = *reinterpret_cast<std::unique_ptr<T, D> *>(smartPtr_);
596 return std::move(object);
600 return std::unique_ptr<T, D>(nullptr, nullptr);
609 inline const std::string &GetTaskName() const
660 static std::string DumpTimeToString(const TimePoint &time);
663 * Convert std::chrono::system_clock::time_point to human readable string.
667 static std::string DumpTimeToString(const std::chrono::system_clock::time_point &time);
675 std::string Dump();
683 std::string TraceInfo();
695 inline std::string GetEventUniqueId()
721 inline void SetOwnerId(std::string ownerId)
729 inline std::string GetOwnerId()
773 smartPtr_ = new (std::nothrow) T(object);
784 smartPtr_ = new (std::nothrow) T(std::move(object));
796 const std::shared_ptr<HiTraceId> GetOrCreateTraceId();
803 const std::shared_ptr<HiTraceId> GetTraceId();
823 static inline size_t CalculateSmartPtrTypeId(const std::shared_ptr<T> &)
829 static inline size_t CalculateSmartPtrTypeId(const std::weak_ptr<T> &)
835 static inline size_t CalculateSmartPtrTypeId(const std::unique_ptr<T, D> &)
841 static inline size_t CalculateSmartPtrTypeId(const std::unique_ptr<T[], D> &)
848 const std::shared_ptr<Waiter> &CreateWaiter();
858 std::weak_ptr<EventHandler> owner_;
876 std::string taskName_;
882 std::shared_ptr<Waiter> waiter_;
885 std::shared_ptr<HiTraceId> hiTraceId_;
888 std::string eventId;
892 std::string ownerId_;