DATRW++ library: seismic data I/O with multiple formats
bytesex.h File Reference

A copy of bytesex.h from libtfxx (prototypes) More...

#include <fstream>
Include dependency graph for bytesex.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

union  datrw::util::IOUnion< T >
 

Namespaces

 datrw
 Root namespace of library.
 
 datrw::util
 Some components used by several I/O format modules.
 

Macros

#define DATRW_BYTESEX_H_VERSION   "DATRW_BYTESEX_H V1.1"
 

Enumerations

enum  datrw::util::Ecpu_type { datrw::util::cpu_Intel = 1, datrw::util::cpu_Motorola = 2, datrw::util::cpu_unknown = 3 }
 Define different CPU type that are recognized. More...
 
enum  datrw::util::Emagic_type { datrw::util::magic_match = 1, datrw::util::magic_swap = 2, datrw::util::magic_nomatch = 3 }
 Define bytesex indicator for magic number test. More...
 

Functions

Ecpu_type datrw::util::cpu ()
 check for my CPU model More...
 
Emagic_type datrw::util::file_magic_test (std::istream &is, const char *const cmagic, const bool &fortranmode)
 check magic number in file More...
 
void datrw::util::file_magic_write (std::ostream &os, const char *const cmagic, const bool &fortranmode)
 write magic number to file More...
 
int datrw::util::magic (const char *const cmagic)
 function to create the magic number More...
 
template<class T >
datrw::util::swap (const T &value)
 How to swap any generic type. More...
 
template<class T >
IOUnion< T > datrw::util::swap (const IOUnion< T > &value)
 Specialization in case we use use an IOUnion. i.e. overloading the function. More...
 

Detailed Description

A copy of bytesex.h from libtfxx (prototypes)


Author
Thomas Forbriger
Date
29/06/2007

A copy of bytesex.h from libtfxx (prototypes)

just to make libdatrw a bit more independent


This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software

Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA

Copyright (c) 2007 by Thomas Forbriger (BFO Schiltach)

REVISIONS and CHANGES

  • 29/06/2007 V1.0 Thomas Forbriger
  • 30/04/2010 V1.1 added magic number writing and reading

Definition in file bytesex.h.