string-formatter.h
Go to the documentation of this file.
1 /* License: Apache 2.0. See LICENSE file in root directory. */
2 /* Copyright(c) 2019 Intel Corporation. All Rights Reserved. */
3 #pragma once
4 #include <string>
5 #include <map>
6 #include <stdint.h>
7 #include <vector>
8 #include <unordered_map>
9 
10 namespace fw_logger
11 {
13  {
14  public:
15  string_formatter(std::unordered_map<std::string, std::vector<std::pair<int, std::string>>> enums);
16  ~string_formatter(void);
17 
18  bool generate_message(const std::string& source, size_t num_of_params, const uint32_t* params, std::string* dest);
19 
20  private:
21  bool replace_params(const std::string& source, const std::map<std::string, std::string>& exp_replace_map, const std::map<std::string, int>& enum_replace_map, std::string* dest);
22 
23  std::unordered_map<std::string, std::vector<std::pair<int, std::string>>> _enums;
24  };
25 }
string_formatter(std::unordered_map< std::string, std::vector< std::pair< int, std::string >>> enums)
bool generate_message(const std::string &source, size_t num_of_params, const uint32_t *params, std::string *dest)
GLsizei const GLchar *const * string
unsigned int uint32_t
Definition: stdint.h:80
bool replace_params(const std::string &source, const std::map< std::string, std::string > &exp_replace_map, const std::map< std::string, int > &enum_replace_map, std::string *dest)
GLenum const GLfloat * params
GLsizei GLsizei GLchar * source
std::unordered_map< std::string, std::vector< std::pair< int, std::string > > > _enums
LZ4LIB_API char * dest
Definition: lz4.h:438
Definition: enums.py:1


librealsense2
Author(s): Sergey Dorodnicov , Doron Hirshberg , Mark Horn , Reagan Lopez , Itay Carpis
autogenerated on Mon May 3 2021 02:50:11