summaryrefslogtreecommitdiffhomepage
path: root/public/frameworks/KernelTest.fwrk/headers/SourceLocation.h
blob: 6507864b0455bee5d7f5092d6beecd9a34b6035a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
/* ========================================

  Copyright (C) 2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.

======================================== */

#pragma once

#include <CoreFoundation.fwrk/headers/Object.h>
#include <CoreFoundation.fwrk/headers/String.h>
#include <KernelTest.fwrk/headers/Foundation.h>

class KTSourceLocation;

/// ================================================================================
/// @brief SourceLocation class for Kernel Test Framework.
/// ================================================================================
class KTSourceLocation final CF_OBJECT {
 public:
  explicit KTSourceLocation()  = delete;
  ~KTSourceLocation() override = default;

  LIBSYS_COPY_DELETE(KTSourceLocation);

 public:
  KTSourceLocation(const Char*, const SInt32 = 0UL);

  CF::CFString File();
  SInt32       Line();

  CF::CFString operator()();

 private:
  CF::CFString mFile{4096};
  SInt32       mLine{0U};
};