simulavr  1.1.0
helper.cpp File Reference
#include <iostream>
#include <sstream>
#include "helper.h"

Go to the source code of this file.

Functions

ostream & operator<< (ostream &os, const HexChar &h)
 
ostream & operator<< (ostream &os, const HexShort &h)
 
ostream & operator<< (ostream &os, const DecLong &h)
 
std::string int2str (int i)
 Convert an int into a string. More...
 
std::string int2hex (int i)
 Convert int into hex string. More...
 
std::string readline (istream &is)
 Reads one line from a stream. More...
 
vector< std::string > split (const std::string &inp, std::string splitc)
 Splits a string into a vector of strings at delimiters splitc. More...
 

Function Documentation

◆ int2hex()

std::string int2hex ( int  i)

Convert int into hex string.

Definition at line 65 of file helper.cpp.

Referenced by InvalidMem::get(), and InvalidMem::set().

◆ int2str()

std::string int2str ( int  i)

◆ operator<<() [1/3]

ostream& operator<< ( ostream &  os,
const HexChar h 
)

Definition at line 36 of file helper.cpp.

References HexChar::val.

◆ operator<<() [2/3]

ostream& operator<< ( ostream &  os,
const HexShort h 
)

Definition at line 44 of file helper.cpp.

References HexShort::val.

◆ operator<<() [3/3]

ostream& operator<< ( ostream &  os,
const DecLong h 
)

Definition at line 52 of file helper.cpp.

References DecLong::val.

◆ readline()

std::string readline ( istream &  is)

Reads one line from a stream.

Definition at line 71 of file helper.cpp.

Referenced by DumpManager::load().

◆ split()

vector<std::string> split ( const std::string &  inp,
std::string  splitc 
)

Splits a string into a vector of strings at delimiters splitc.

Definition at line 82 of file helper.cpp.

Referenced by DumpManager::load().