mmCEsim 0.3.0
mmWave Channel Estimation Simulation
Alg Class Reference

#include <alg.h>

Collaboration diagram for Alg:
[legend]

Classes

struct  Error
 
struct  Var
 

Public Types

using Warning = Error
 
using Errors = std::vector< Error >
 
using Warnings = std::vector< Warning >
 
using Alg_Lines = std::vector< Alg_Line >
 
using Raw_Strings = std::vector< std::string >
 
using Line_Nos = std::vector< Raw_Strings::size_type >
 
using Keys = std::vector< std::string >
 
using Vars = std::vector< Var >
 

Public Member Functions

 Alg ()=default
 
 Alg (const std::string &str, const Macro &macro=macro_none, int job_cnt=-1, int alg_cnt=-1, bool fail_fast=false, bool add_comment=false, bool add_semicolon=true, ALG_Opt opt=ALG_Opt::NONE)
 
const Alg_Lineslines () const
 
const Alg_Lineline (Alg_Lines::size_type index) const
 
const Errorserrors () const
 
const Errorerror (Errors::size_type index) const
 
const Warningswarnings () const
 
const Warningwarning (Errors::size_type index) const
 
bool hasError () const noexcept
 
bool write (std::ofstream &f, const std::string &lang)
 
std::string inlineCalc (const std::string &s, const std::string &lang)
 
void setIndent (bool use_space=true, unsigned indent_size=4)
 

Private Member Functions

std::ofstream & _wComment (std::ofstream &f, const std::string &lang, const std::string &before="")
 
std::string _indent (size_t indent_size) const noexcept
 
bool _applyKey (Alg_Line &line, const Keys &keys) const
 
void _recoverPrint () const
 

Private Attributes

Alg_Lines _lines
 
Errors _errors
 
Warnings _warnings
 
Raw_Strings _raw_strings
 
Line_Nos _line_nos
 
Vars _vars
 
bool _failed = false
 
bool _use_space = false
 
bool _add_semicolon = true
 
bool _add_comment = true
 
unsigned _indent_size = 4
 
std::stack< std::string > _contents_at_end
 
Macro _macro
 
int _alg_cnt = 0
 
int _job_cnt = 0
 
int _recover_cnt = 0
 
std::vector< std::string > _recover_cnt_var
 
int _branch_line = Alg::max_length
 

Static Private Attributes

static const int max_length = 100000
 

Member Typedef Documentation

◆ Alg_Lines

using Alg::Alg_Lines = std::vector<Alg_Line>

◆ Errors

using Alg::Errors = std::vector<Error>

◆ Keys

using Alg::Keys = std::vector<std::string>

◆ Line_Nos

using Alg::Line_Nos = std::vector<Raw_Strings::size_type>

◆ Raw_Strings

using Alg::Raw_Strings = std::vector<std::string>

◆ Vars

using Alg::Vars = std::vector<Var>

◆ Warning

◆ Warnings

using Alg::Warnings = std::vector<Warning>

Constructor & Destructor Documentation

◆ Alg() [1/2]

Alg::Alg ( )
default

◆ Alg() [2/2]

Alg::Alg ( const std::string &  str,
const Macro macro = macro_none,
int  job_cnt = -1,
int  alg_cnt = -1,
bool  fail_fast = false,
bool  add_comment = false,
bool  add_semicolon = true,
ALG_Opt  opt = ALG_Opt::NONE 
)
Here is the call graph for this function:

Member Function Documentation

◆ _applyKey()

bool Alg::_applyKey ( Alg_Line line,
const Keys keys 
) const
inlineprivate
Here is the call graph for this function:

◆ _indent()

std::string Alg::_indent ( size_t  indent_size) const
inlineprivatenoexcept

◆ _recoverPrint()

void Alg::_recoverPrint ( ) const
private

◆ _wComment()

std::ofstream & Alg::_wComment ( std::ofstream &  f,
const std::string &  lang,
const std::string &  before = "" 
)
private
Here is the caller graph for this function:

◆ error()

const Alg::Error & Alg::error ( Errors::size_type  index) const
inline

◆ errors()

const Alg::Errors & Alg::errors ( ) const
inline

◆ hasError()

bool Alg::hasError ( ) const
inlinenoexcept

◆ inlineCalc()

std::string Alg::inlineCalc ( const std::string &  s,
const std::string &  lang 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ line()

const Alg_Line & Alg::line ( Alg_Lines::size_type  index) const
inline
Here is the caller graph for this function:

◆ lines()

const Alg::Alg_Lines & Alg::lines ( ) const
inline

◆ setIndent()

void Alg::setIndent ( bool  use_space = true,
unsigned  indent_size = 4 
)
inline

◆ warning()

const Alg::Warning & Alg::warning ( Errors::size_type  index) const
inline

◆ warnings()

const Alg::Warnings & Alg::warnings ( ) const
inline

◆ write()

bool Alg::write ( std::ofstream &  f,
const std::string &  lang 
)
Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ _add_comment

bool Alg::_add_comment = true
private

◆ _add_semicolon

bool Alg::_add_semicolon = true
private

◆ _alg_cnt

int Alg::_alg_cnt = 0
private

◆ _branch_line

int Alg::_branch_line = Alg::max_length
private

◆ _contents_at_end

std::stack<std::string> Alg::_contents_at_end
private

◆ _errors

Errors Alg::_errors
private

◆ _failed

bool Alg::_failed = false
private

◆ _indent_size

unsigned Alg::_indent_size = 4
private

◆ _job_cnt

int Alg::_job_cnt = 0
private

◆ _line_nos

Line_Nos Alg::_line_nos
private

◆ _lines

Alg_Lines Alg::_lines
private

◆ _macro

Macro Alg::_macro
private

◆ _raw_strings

Raw_Strings Alg::_raw_strings
private

◆ _recover_cnt

int Alg::_recover_cnt = 0
private

◆ _recover_cnt_var

std::vector<std::string> Alg::_recover_cnt_var
private

◆ _use_space

bool Alg::_use_space = false
private

◆ _vars

Vars Alg::_vars
private

◆ _warnings

Warnings Alg::_warnings
private

◆ max_length

const int Alg::max_length = 100000
staticprivate

The documentation for this class was generated from the following files: