Fawkes API
Fawkes Development Version
|
00001 00002 /*************************************************************************** 00003 * fvfile_block.h - FireVision file block 00004 * 00005 * Created: Fri Mar 28 11:52:45 2008 00006 * Copyright 2008 Tim Niemueller [www.niemueller.de] 00007 * 00008 ****************************************************************************/ 00009 00010 /* This program is free software; you can redistribute it and/or modify 00011 * it under the terms of the GNU General Public License as published by 00012 * the Free Software Foundation; either version 2 of the License, or 00013 * (at your option) any later version. A runtime exception applies to 00014 * this software (see LICENSE.GPL_WRE file mentioned below for details). 00015 * 00016 * This program is distributed in the hope that it will be useful, 00017 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00018 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00019 * GNU Library General Public License for more details. 00020 * 00021 * Read the full text in the LICENSE.GPL_WRE file in the doc directory. 00022 */ 00023 00024 #ifndef __FIREVISION_FVUTILS_FILEFORMAT_FVFILE_BLOCK_H_ 00025 #define __FIREVISION_FVUTILS_FILEFORMAT_FVFILE_BLOCK_H_ 00026 00027 #include <fvutils/fileformat/fvff.h> 00028 #include <cstddef> 00029 00030 namespace firevision { 00031 #if 0 /* just to make Emacs auto-indent happy */ 00032 } 00033 #endif 00034 00035 class FireVisionDataFileBlock 00036 { 00037 public: 00038 FireVisionDataFileBlock(unsigned int type, size_t data_size, 00039 void *spec_header, size_t spec_header_size); 00040 FireVisionDataFileBlock(unsigned int type, size_t data_size, 00041 size_t spec_header_size); 00042 FireVisionDataFileBlock(unsigned int type, size_t data_size); 00043 FireVisionDataFileBlock(FireVisionDataFileBlock *block); 00044 virtual ~FireVisionDataFileBlock(); 00045 00046 unsigned int type() const; 00047 void * block_memptr() const; 00048 size_t block_size() const; 00049 void * data_ptr() const; 00050 size_t data_size() const; 00051 00052 protected: 00053 void set_spec_header(void *spec_header, size_t spec_header_size); 00054 00055 void *_data; 00056 size_t _data_size; 00057 void *_spec_header; 00058 00059 private: 00060 void constructor(unsigned int type, size_t data_size, 00061 void *spec_header, size_t spec_header_size); 00062 00063 fvff_block_header_t *__block_header; 00064 void *__block_memptr; 00065 size_t __block_size; 00066 bool __block_owner; 00067 00068 size_t __spec_header_size; 00069 }; 00070 00071 } // end namespace firevision 00072 00073 #endif