Function BufferUpdateCallback

Synopsis

#include <include/bufferupdatecallback.hpp>

BufferUpdateCallback(const BitArchiveCreator &creator, const vector< byte_t > &in_buffer, const wstring &in_buffer_name)

Description

Most of this code is taken from the CUpdateCallback class in Client7z.cpp of the 7z SDK Main changes made:

  • Use of std::vector instead of CRecordVector, CObjectVector and UStringVector
  • Use of std::wstring instead of UString (see Callback base interface)
  • Error messages are not showed (see comments in ExtractCallback)
  • The work performed originally by the Init method is now performed by the class constructor
  • FSItem class is used instead of CDirItem struct

Source

Lines 39-44 in src/bufferupdatecallback.cpp. Line 35 in include/bufferupdatecallback.hpp.

BufferUpdateCallback::BufferUpdateCallback( const BitArchiveCreator& creator,
                                            const vector< byte_t >& in_buffer,
                                            const wstring& in_buffer_name )
    : UpdateCallback( creator ),
      mBuffer( in_buffer ),
      mBufferName( in_buffer_name ) {}





Add Discussion as Guest

Log in