8#ifndef INCLUDED_BALST_RESOLVER_FILEHELPER
9#define INCLUDED_BALST_RESOLVER_FILEHELPER
156#include <balscm_version.h>
160#if defined(BALST_OBJECTFILEFORMAT_RESOLVER_ELF) || \
161 defined(BALST_OBJECTFILEFORMAT_RESOLVER_XCOFF)
184class Resolver_FileHelper {
188 typedef FilesystemUtil::Offset Offset;
193 FilesystemUtil::FileDescriptor d_fd;
197 Resolver_FileHelper(
const Resolver_FileHelper&);
198 Resolver_FileHelper& operator=(
199 const Resolver_FileHelper&);
205 Resolver_FileHelper();
208 ~Resolver_FileHelper();
217 int initialize(
const char *fileName);
229 char *loadString(Offset offset,
231 UintPtr scratchBufLength,
238 UintPtr readBytes(
void *buf, UintPtr numBytes, Offset offset)
const;
244 int readExact(
void *buf, UintPtr numBytes, Offset offset)
const;
257int Resolver_FileHelper::readExact(
void *buf,
264 UintPtr res = readBytes(buf, numBytes, offset);
265 return res != numBytes ? -1 : 0;
Definition bslma_allocator.h:457
#define BSLS_ASSERT(X)
Definition bsls_assert.h:1804
#define BSLS_IDENT(str)
Definition bsls_ident.h:195
Definition balst_objectfileformat.h:161
Definition bdls_filesystemutil.h:362
std::size_t UintPtr
Definition bsls_types.h:126
std::ptrdiff_t IntPtr
Definition bsls_types.h:130