CBMC
jar_poolt Class Reference

A chache for jar_filet objects, by file name. More...

#include <jar_pool.h>

+ Collaboration diagram for jar_poolt:

Public Member Functions

jar_filetoperator() (const std::string &jar_path)
 Load jar archive or retrieve from cache if already loaded. More...
 
jar_filetadd_jar (const std::string &buffer_name, const void *pmem, size_t size)
 Add a jar archive or retrieve from cache if already added. More...
 

Protected Attributes

std::map< std::string, jar_filetm_archives
 Jar files that have been loaded. More...
 

Detailed Description

A chache for jar_filet objects, by file name.

Definition at line 18 of file jar_pool.h.

Member Function Documentation

◆ add_jar()

jar_filet & jar_poolt::add_jar ( const std::string &  buffer_name,
const void *  pmem,
size_t  size 
)

Add a jar archive or retrieve from cache if already added.

Note that this mocks the existence of a file which may or may not exist since the actual data is retrieved from memory.

Parameters
buffer_namename of the original file
pmemmemory pointer to the contents of the file
sizesize of the memory buffer

Definition at line 21 of file jar_pool.cpp.

◆ operator()()

jar_filet & jar_poolt::operator() ( const std::string &  jar_path)

Load jar archive or retrieve from cache if already loaded.

Parameters
jar_pathname of the file

Definition at line 12 of file jar_pool.cpp.

Member Data Documentation

◆ m_archives

std::map<std::string, jar_filet> jar_poolt::m_archives
protected

Jar files that have been loaded.

Definition at line 37 of file jar_pool.h.


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