Commit 8f3992df authored by phlo's avatar phlo

updated MMap class visibility

parent 2bbd1e4b
......@@ -12,13 +12,12 @@ namespace ConcuBinE {
//==============================================================================
//------------------------------------------------------------------------------
// constructors
// public constructors
//------------------------------------------------------------------------------
MMap::MMap(std::istream & f, const std::string & p) : path(p)
MMap::MMap (std::istream & f, const std::string & p) : path(p)
{
size_t line_num = 1;
for (std::string line_buf; std::getline(f, line_buf); line_num++)
{
// skip empty lines
......@@ -64,7 +63,7 @@ MMap::MMap(std::istream & f, const std::string & p) : path(p)
}
//------------------------------------------------------------------------------
// member functions
// public member functions
//------------------------------------------------------------------------------
// MMap::print -----------------------------------------------------------------
......@@ -74,7 +73,7 @@ std::string MMap::print () const
std::ostringstream ss;
for (const auto & [adr, val] : *this)
ss << adr << " " << val << eol;
ss << adr << ' ' << val << eol;
return ss.str();
}
......
......@@ -11,44 +11,36 @@ namespace ConcuBinE {
// MMap class
//==============================================================================
struct MMap : std::map<word_t, word_t>
struct MMap : public std::map<word_t, word_t>
{
//----------------------------------------------------------------------------
// member types
// public constructors
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
// members
//----------------------------------------------------------------------------
// path to memory map file
//
std::string path;
//----------------------------------------------------------------------------
// constructors
//----------------------------------------------------------------------------
// inherit base constructors
// expose constructors from std::map
//
using std::map<word_t, word_t>::map;
// construct from file
// parse input stream
//
MMap (std::istream & file, const std::string & path);
//----------------------------------------------------------------------------
// member functions
// public member functions
//----------------------------------------------------------------------------
// print memory map
//
std::string print () const;
};
//==============================================================================
// non-member operators
//==============================================================================
//----------------------------------------------------------------------------
// public data members
//----------------------------------------------------------------------------
// path to memory map file
//
std::string path;
};
} // namespace ConcuBinE
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment