mmCEsim 0.3.0
mmWave Channel Estimation Simulation
type_track.h
Go to the documentation of this file.
1
12#ifndef _EXPORT_TYPE_TRACK_
13#define _EXPORT_TYPE_TRACK_
14
15#include "export/type.h"
16#include "log_global.h"
17#include <iostream>
18#include <stack>
19#include <stdexcept>
20#include <utility>
21#include <vector>
22
23#define _TYPE_TRACK_PRINT_INFO
24
25using Type_Pair = std::pair<std::string, Type>;
26
28 public:
29 Type operator[](const std::string& var);
30
31 void operator++(int);
32
33 void operator--(int);
34
35 void push(const std::string& var, const Type& type);
36
37 void push(const std::string& var, const std::string& type);
38
39 size_t size() const noexcept;
40
41 bool empty() const noexcept;
42
43 private:
44 std::vector<Type_Pair> _types;
45 std::stack<size_t> _scopes; // the index of the starting scope
46};
47
48inline size_t Type_Track::size() const noexcept { return _types.size(); }
49
50inline bool Type_Track::empty() const noexcept { return _types.empty(); }
51
52#endif
Definition: type_track.h:27
std::stack< size_t > _scopes
Definition: type_track.h:45
void operator++(int)
Definition: type_track.cpp:22
void push(const std::string &var, const Type &type)
Definition: type_track.cpp:43
Type operator[](const std::string &var)
Definition: type_track.cpp:14
bool empty() const noexcept
Definition: type_track.h:50
std::vector< Type_Pair > _types
Definition: type_track.h:44
size_t size() const noexcept
Definition: type_track.h:48
void operator--(int)
Definition: type_track.cpp:29
Definition: type.h:18
Global Access of Log.
type
Definition: version_bump.py:14
Type Specification in Alg.
std::pair< std::string, Type > Type_Pair
Definition: type_track.h:25