teditor  1.8.0@@fee5e94
Terminal based editor written in C++
infocmp.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "utils.h"
4 #include <unordered_map>
5 
6 namespace teditor {
7 
8 struct InfoCmp {
9  // header
10  std::string header;
11  // boolean capabilities
13  // numerical capabilities
14  std::unordered_map<std::string, unsigned> numCaps;
15  // string capabilities
16  std::unordered_map<std::string, std::string> strCaps;
17 
18  InfoCmp();
19 
20  std::string getStrCap(const std::string& cap) const;
21 }; // struct InfoCmp
22 
23 } // namespace teditor
teditor::split
Strings split(const std::string &str, char delim)
Definition: utils.cpp:48
teditor::InfoCmp::header
std::string header
Definition: infocmp.h:10
teditor::str2num
int str2num(const std::string &str)
Definition: utils.cpp:73
teditor::check_output
CmdStatus check_output(const std::string &cmd)
Definition: utils.cpp:110
teditor::InfoCmp
Definition: infocmp.h:8
teditor::InfoCmp::numCaps
std::unordered_map< std::string, unsigned > numCaps
Definition: infocmp.h:14
teditor::InfoCmp::InfoCmp
InfoCmp()
Definition: infocmp.cpp:5
teditor::Strings
std::vector< std::string > Strings
Definition: utils.h:42
teditor::InfoCmp::boolCaps
Strings boolCaps
Definition: infocmp.h:12
infocmp.h
utils.h
teditor::InfoCmp::getStrCap
std::string getStrCap(const std::string &cap) const
Definition: infocmp.cpp:51
ASSERT
#define ASSERT(check, fmt,...)
Macro to assert with runtime_error exception if the check fails.
Definition: utils.h:35
teditor::InfoCmp::strCaps
std::unordered_map< std::string, std::string > strCaps
Definition: infocmp.h:16
teditor
Definition: any.hpp:10