geopm 3.1.1.dev410+g40bf96ed
GEOPM - Global Extensible Open Power Manager
Loading...
Searching...
No Matches
FilePolicy.hpp
Go to the documentation of this file.
1/*
2 * Copyright (c) 2015 - 2024 Intel Corporation
3 * SPDX-License-Identifier: BSD-3-Clause
4 */
5
6#ifndef FILEPOLICY_HPP_INCLUDE
7#define FILEPOLICY_HPP_INCLUDE
8
9#include <vector>
10#include <map>
11#include <string>
12
13namespace geopm
14{
16 {
17 public:
18 FilePolicy() = delete;
19 FilePolicy(const FilePolicy &other) = delete;
20 FilePolicy &operator=(const FilePolicy &other) = delete;
21 FilePolicy(const std::string &policy_path,
22 const std::vector<std::string> &policy_names);
23 virtual ~FilePolicy() = default;
29 std::vector<double> get_policy(void);
30 private:
31 std::map<std::string, double> parse_json(const std::string &path);
32 std::vector<double> m_policy;
33 const std::string m_policy_path;
34 const std::vector<std::string> m_policy_names;
35 };
36}
37
38#endif
Definition FilePolicy.hpp:16
FilePolicy(const FilePolicy &other)=delete
FilePolicy & operator=(const FilePolicy &other)=delete
virtual ~FilePolicy()=default
std::vector< double > get_policy(void)
Read policy values from a JSON file.
Definition FilePolicy.cpp:71
Definition Accumulator.cpp:12