summaryrefslogtreecommitdiffstats
path: root/Source/CTest/cmCTestHardwareSpec.h
blob: a0b4cae596e5f144f580806fd5a92676416e31aa (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
37
38
39
40
/* Distributed under the OSI-approved BSD 3-Clause License.  See accompanying
   file Copyright.txt or https://cmake.org/licensing for details.  */
#ifndef cmCTestHardwareSpec_h
#define cmCTestHardwareSpec_h

#include <map>
#include <string>
#include <vector>

class cmCTestHardwareSpec
{
public:
  class Resource
  {
  public:
    std::string Id;
    unsigned int Capacity;

    bool operator==(const Resource& other) const;
    bool operator!=(const Resource& other) const;
  };

  class Socket
  {
  public:
    std::map<std::string, std::vector<Resource>> Resources;

    bool operator==(const Socket& other) const;
    bool operator!=(const Socket& other) const;
  };

  Socket LocalSocket;

  bool ReadFromJSONFile(const std::string& filename);

  bool operator==(const cmCTestHardwareSpec& other) const;
  bool operator!=(const cmCTestHardwareSpec& other) const;
};

#endif