RTEMS Linker  0.0.1
RTEMS Tools Project
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
rld::files::archive Class Reference

#include <rld-files.h>

Inheritance diagram for rld::files::archive:
rld::files::image

Public Member Functions

 archive (const std::string &name)
 
virtual ~archive ()
 
void begin ()
 
void end ()
 
bool is (const std::string &name) const
 
bool is_valid ()
 
void load_objects (objects &objs)
 
const std::string & get_name () const
 
bool operator< (const archive &rhs) const
 
void create (object_list &objects)
 
- Public Member Functions inherited from rld::files::image
 image (file &name)
 
 image (const std::string &path, bool is_object=true)
 
 image ()
 
virtual ~image ()
 
virtual void open (file &name)
 
virtual void open (bool writable=false)
 
virtual void close ()
 
virtual ssize_t read (void *buffer, size_t size)
 
virtual ssize_t write (const void *buffer, size_t size)
 
virtual void seek (off_t offset)
 
virtual bool seek_read (off_t offset, uint8_t *buffer, size_t size)
 
virtual bool seek_write (off_t offset, const void *buffer, size_t size)
 
const filename () const
 
virtual int references () const
 
virtual size_t size () const
 
virtual int fd () const
 
elf::fileelf ()
 
virtual void symbol_referenced ()
 
virtual int symbol_references () const
 
const std::string path () const
 
bool is_open () const
 
bool is_writable () const
 

Detailed Description

The archive class proivdes access to object files that are held in a AR format file. GNU AR extensions are supported. The archive is a kind of image and provides the container for the object's that it contains.

Constructor & Destructor Documentation

rld::files::archive::archive ( const std::string &  name)

Open a archive format file that contains ELF object files.

Parameters
nameThe name of the archive.
rld::files::archive::~archive ( )
virtual

Close the archive.

Member Function Documentation

void rld::files::archive::begin ( )

Begin the ELF session.

void rld::files::archive::create ( object_list objects)

Create a new archive containing the given set of objects. If referening an existing archive it is overwritten.

Parameters
objectsThe list of objects to place in the archive.
void rld::files::archive::end ( )

End the ELF session.

const std::string& rld::files::archive::get_name ( ) const

Get the name.

Returns
const std::string& Return a reference to the archive's name.
bool rld::files::archive::is ( const std::string &  name) const

Match the archive name.

Parameters
nameThe name of the archive to check.
Return values
trueThe name matches.
falseThe name does not match.
bool rld::files::archive::is_valid ( )

Check this is a valid archive.

Return values
trueIt is a valid archive.
falseIt is not a valid archive.
void rld::files::archive::load_objects ( objects objs)

Load object's from the archive adding each to the provided objects container.

Parameters
objsThe container the loaded object files are added too.
bool rld::files::archive::operator< ( const archive rhs) const

Less than operator for the map container. It compares the name of the the archive.

Parameters
rhsThe right hand side of the '<' operator.
Returns
true The right hand side is less than this archive.
false The right hand side is greater than or equal to this archive.

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