VIZ++ Class: BinaryFile

 VIZ++ Class Library  VIZ++ Samples  VIZ++ ClassTree 

Source code

/*
 * BinaryFile.h 
 * Copyright (c) 2015 Antillia.com TOSHIYUKI ARAI. ALL RIGHTS RESERVED. 
 */


// VIZ++2000
// 2000.07.09 Modified;
// 2009/10/18 Modified the parameter 'char* buffer' for methods to 'unsigned char* buffer'.

#pragma once

#include <viz++\File.h>

namespace VIZ {

class BinaryFile :public File {
  
public:
  BinaryFile() { }

  unsigned long   read(__out char* buffer, __in unsigned long size) {
      return File::read(buffer, size);
  }

  unsigned long   write(__out char* buffer, __in unsigned long size) {
      return File::write(buffer, size);
  }

  unsigned long   read(__in long offset, __out char* buffer, __in unsigned long size) {
      seek(offset, FILE_BEGIN);
      return File::read(buffer, size);
  }

  unsigned long   write(__in long offset, __out char* buffer, __in unsigned long size) {
      seek(offset, FILE_BEGIN);
      return File::write(buffer, size);
  }

// unsigned char buffer
  unsigned long   read(__out unsigned char* buffer, __in unsigned long size) {
      return File::read(buffer, size);
  }

  unsigned long   write(__out unsigned char* buffer, __in unsigned long size) {
      return File::write(buffer, size);
  }

  unsigned long   read(__in long offset, __out unsigned char* buffer, __in unsigned long size) {
      seek(offset, FILE_BEGIN);
      return File::read(buffer, size);
  }

  unsigned long   write(__in long offset, __out unsigned char* buffer, __in unsigned long size) {
      seek(offset, FILE_BEGIN);
      return File::write(buffer, size);
  }


};

}



Last modified: 10 Feb 2017

Copyright (c) 2009-2017 Antillia.com ALL RIGHTS RESERVED.