CBMC
jar_pool.h
Go to the documentation of this file.
1 /*******************************************************************\
2 
3 Module:
4 
5 Author: Daniel Kroening, kroening@kroening.com
6 
7 \*******************************************************************/
8 
9 #ifndef CPROVER_JAVA_BYTECODE_JAR_POOL_H
10 #define CPROVER_JAVA_BYTECODE_JAR_POOL_H
11 
12 #include <map>
13 #include <string>
14 
15 #include "jar_file.h"
16 
18 class jar_poolt
19 {
20 public:
23  // Throws an exception if the file does not exist
24  jar_filet &operator()(const std::string &jar_path);
25 
32  jar_filet &
33  add_jar(const std::string &buffer_name, const void *pmem, size_t size);
34 
35 protected:
37  std::map<std::string, jar_filet> m_archives;
38 };
39 
40 #endif // CPROVER_JAVA_BYTECODE_JAVA_CLASS_LOADER_H
Class representing a .jar archive.
Definition: jar_file.h:22
A chache for jar_filet objects, by file name.
Definition: jar_pool.h:19
jar_filet & add_jar(const std::string &buffer_name, const void *pmem, size_t size)
Add a jar archive or retrieve from cache if already added.
Definition: jar_pool.cpp:21
jar_filet & operator()(const std::string &jar_path)
Load jar archive or retrieve from cache if already loaded.
Definition: jar_pool.cpp:12
std::map< std::string, jar_filet > m_archives
Jar files that have been loaded.
Definition: jar_pool.h:37