Skip to content

Commit 007ded0

Browse files
author
Matthias Güdemann
committed
Documentation for jar_file
1 parent 98d19c8 commit 007ded0

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

jbmc/src/java_bytecode/jar_file.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,12 +77,20 @@ optionalt<std::string> jar_filet::get_entry(const std::string &name)
7777
}
7878
}
7979

80+
/// Wrapper for `std::isspace` from `cctype`
81+
/// \param ch: the character to check
82+
/// \return true if the parameter is considered to be a space in the current
83+
/// locale, else false
8084
static bool is_space(const char ch)
8185
{
8286
return std::isspace(ch) != 0;
8387
}
8488

8589
/// Remove leading and trailing whitespace characters from string
90+
/// \param begin: iterator to start search in string
91+
/// \param end: iterator to end search in string
92+
/// \return string truncated from begin to end and all whitespace removed at the
93+
/// begin and end
8694
static std::string trim(
8795
const std::string::const_iterator begin,
8896
const std::string::const_iterator end)

jbmc/src/java_bytecode/jar_file.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ Author: Diffblue Ltd
1818

1919
#include "mz_zip_archive.h"
2020

21-
/// Class representing a .jar archive
21+
/// Class representing a .jar archive uses miniz to decompress and index
22+
/// archive.
2223
class jar_filet final
2324
{
2425
public:
@@ -44,7 +45,8 @@ class jar_filet final
4445
/// \param filename Name of the file in the archive
4546
optionalt<std::string> get_entry(const std::string &filename);
4647

47-
/// Get contents of the Manifest file in the jar archive
48+
/// Get contents of the Manifest file in the jar archive as a key-value map
49+
/// (both as strings)
4850
std::unordered_map<std::string, std::string> get_manifest();
4951

5052
/// Get list of filenames in the archive

0 commit comments

Comments
 (0)