• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

tudasc / TypeART / 19336558931

13 Nov 2025 03:24PM UTC coverage: 90.337% (+1.4%) from 88.924%
19336558931

push

github

web-flow
Global variables as type descriptors (#173)

597 of 629 new or added lines in 25 files covered. (94.91%)

2 existing lines in 2 files now uncovered.

4768 of 5278 relevant lines covered (90.34%)

208224.38 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

66.67
/lib/runtime/GlobalTypeDefCallbacks.h
1
#ifndef LIB_RUNTIME_GLOBALTYPEDEFCALLBACKS
2
#define LIB_RUNTIME_GLOBALTYPEDEFCALLBACKS
3

4
#include "RuntimeData.h"
5
#include "TypeInterface.h"
6
#include "support/Logger.h"
7

8
namespace typeart {
9

10
class TypeDatabase;
11

12
class GlobalTypeTranslator final {
13
 private:
14
  RuntimeT::TypeLookupMapT translator_map;
15
  class Impl;
16
  std::unique_ptr<Impl> pImpl;
17

18
 public:
19
  explicit GlobalTypeTranslator(TypeDatabase& db);
20
  ~GlobalTypeTranslator();
21

22
  void register_type(const void* type);
23

24
  [[nodiscard]] inline const RuntimeT::TypeLookupMapT& get_translator_map() const {
25
    return translator_map;
26
  }
27

28
  [[nodiscard]] inline int get_type_id_for(MemAddr addr) const {
11,680✔
29
    if (auto element = translator_map.find(addr); element != translator_map.end()) {
23,360✔
30
      return element->second;
11,680✔
31
    }
NEW
32
    LOG_WARNING("Unknown type for address " << addr)
×
NEW
33
    return TYPEART_UNKNOWN_TYPE;
×
34
  }
11,680✔
35

36
  GlobalTypeTranslator(const GlobalTypeTranslator&)                = delete;
37
  GlobalTypeTranslator& operator=(const GlobalTypeTranslator&)     = delete;
38
  GlobalTypeTranslator(GlobalTypeTranslator&&) noexcept            = delete;
39
  GlobalTypeTranslator& operator=(GlobalTypeTranslator&&) noexcept = delete;
40
};
41

42
}  // namespace typeart
43

44
#endif /* LIB_RUNTIME_GLOBALTYPEDEFCALLBACKS */
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc