mirror of
https://github.com/serge1/ELFIO.git
synced 2024-12-26 18:15:40 +00:00
Make load/save functions of section/segment - private
This commit is contained in:
parent
785a7767ea
commit
626ccc6cbd
@ -32,6 +32,7 @@ namespace ELFIO {
|
||||
|
||||
class section
|
||||
{
|
||||
friend class elfio;
|
||||
public:
|
||||
virtual ~section() {};
|
||||
|
||||
@ -65,6 +66,7 @@ class section
|
||||
virtual void append_data( const char* pData, Elf_Word size ) = 0;
|
||||
virtual void append_data( const std::string& data ) = 0;
|
||||
|
||||
protected:
|
||||
virtual void load( std::ifstream& f,
|
||||
std::streampos header_offset ) const = 0;
|
||||
virtual void save( std::ofstream& f,
|
||||
@ -190,6 +192,8 @@ class section_impl : public section
|
||||
return append_data( str_data.c_str(), str_data.size() );
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
protected:
|
||||
//------------------------------------------------------------------------------
|
||||
void
|
||||
load( std::ifstream& stream,
|
||||
|
@ -32,6 +32,7 @@ namespace ELFIO {
|
||||
|
||||
class segment
|
||||
{
|
||||
friend class elfio;
|
||||
public:
|
||||
virtual ~segment() {};
|
||||
|
||||
@ -59,6 +60,7 @@ class segment
|
||||
virtual Elf_Half get_sections_num() const = 0;
|
||||
virtual Elf_Half get_section_index_at( Elf_Half num ) const = 0;
|
||||
|
||||
protected:
|
||||
virtual void load( std::ifstream& stream, std::streampos header_offset ) const = 0;
|
||||
virtual void save( std::ofstream& f, std::streampos header_offset,
|
||||
std::streampos data_offset ) = 0;
|
||||
@ -145,6 +147,8 @@ class segment_impl : public segment
|
||||
return -1;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
protected:
|
||||
//------------------------------------------------------------------------------
|
||||
void
|
||||
load( std::ifstream& stream,
|
||||
|
Loading…
Reference in New Issue
Block a user