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

daisytuner / sdfglib / 20770413849

06 Jan 2026 10:50PM UTC coverage: 62.168% (+21.4%) from 40.764%
20770413849

push

github

web-flow
Merge pull request #433 from daisytuner/clang-coverage

updates clang coverage flags

14988 of 24109 relevant lines covered (62.17%)

88.57 hits per line

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

11.11
/include/sdfg/codegen/code_snippet_factory.h
1
#pragma once
2
#include <string>
3

4
#include "utils.h"
5

6
namespace sdfg {
7
namespace codegen {
8

9
inline std::string CODE_SNIPPET_INIT_ONCE = "init_once";
10
inline std::string CODE_SNIPPET_DEINIT_ONCE = "deinit_once";
11

12
class CodeSnippet {
13
protected:
14
    PrettyPrinter stream_;
15
    std::string extension_;
16
    bool as_file_;
17
    std::string name_;
18

19
public:
20
    CodeSnippet(const std::string& name, const std::string& extension, bool as_file)
21
        : extension_(extension), as_file_(as_file), name_(name) {};
×
22

23
    PrettyPrinter& stream() { return stream_; }
×
24

25
    const PrettyPrinter& stream() const { return stream_; }
×
26

27
    const std::string& extension() const { return extension_; }
×
28

29
    bool is_as_file() const { return as_file_; }
×
30

31
    const std::string& name() const { return name_; }
×
32
};
33

34
class CodeSnippetFactory {
35
protected:
36
    std::unordered_map<std::string, CodeSnippet> snippets_;
37
    const std::filesystem::path output_path_;
38
    const std::filesystem::path header_path_;
39

40
public:
41
    CodeSnippetFactory(const std::pair<std::filesystem::path, std::filesystem::path>* config = nullptr);
42

43
    virtual ~CodeSnippetFactory() = default;
46✔
44

45
    CodeSnippet& require(const std::string& name, const std::string& extension, bool as_file = true);
46

47
    std::unordered_map<std::string, CodeSnippet>::iterator find(const std::string& name);
48

49
    const std::unordered_map<std::string, CodeSnippet>& snippets() const;
50

51
    const std::filesystem::path& output_path() const { return output_path_; }
×
52
    const std::filesystem::path& header_path() const { return header_path_; }
×
53
};
54

55

56
} // namespace codegen
57
} // namespace sdfg
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