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

HDFGroup / hermes / 4851146873

pending completion
4851146873

Pull #515

github

GitHub
Merge dfccd2f77 into 87672e106
Pull Request #515: v1.0

4370 of 4370 new or added lines in 109 files covered. (100.0%)

4182 of 6032 relevant lines covered (69.33%)

7415316.65 hits per line

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

50.0
/traits/example/example_trait.h
1
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
2
* Distributed under BSD 3-Clause license.                                   *
3
* Copyright by The HDF Group.                                               *
4
* Copyright by the Illinois Institute of Technology.                        *
5
* All rights reserved.                                                      *
6
*                                                                           *
7
* This file is part of Hermes. The full Hermes copyright notice, including  *
8
* terms governing use, modification, and redistribution, is contained in    *
9
* the COPYING file, which can be found at the top directory. If you do not  *
10
* have access to the file, you may request a copy from help@hdfgroup.org.   *
11
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
12

13
#ifndef HERMES_TRAITS_EXAMPLE_EXAMPLE_TRAIT_H_
14
#define HERMES_TRAITS_EXAMPLE_EXAMPLE_TRAIT_H_
15

16
#include "hermes.h"
17

18
namespace hermes::api {
19

20
struct ExampleTraitHeader : public TraitHeader {
21
  int hello_;
22
  explicit ExampleTraitHeader(const std::string &trait_uuid,
23
                              const std::string &trait_name,
24
                              int hello)
25
      : TraitHeader(trait_uuid, trait_name, HERMES_TRAIT_PUT_GET),
26
        hello_(hello) {}
27
};
28

29
struct ExampleTraitParams {
30
  int hello_;
31
};
32

33
class ExampleTrait : public Trait {
34
 public:
35
  HERMES_TRAIT_H(ExampleTrait, "ExampleTrait");
×
36

37
 public:
38
  explicit ExampleTrait(hshm::charbuf &data) : Trait(data) {}
1✔
39

40
  explicit ExampleTrait(const std::string &trait_uuid, int hello) {
41
    auto hdr = CreateHeader<ExampleTraitHeader>(trait_uuid, trait_name_, hello);
42
    hdr->hello_ = hello;
43
  }
44

45
  void Run(int method, void *params) override;
46
};
47

48
}  // namespace hermes::api
49

50
#endif  // HERMES_TRAITS_EXAMPLE_EXAMPLE_TRAIT_H_
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