Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members

binio.h

00001 // Copyright (C) 2001 Jean-Marc Valin
00002 
00003 #ifndef BINIO_H
00004 #define BINIO_H
00005 
00006 #include <iostream>
00007 #include <stdlib.h>
00008 
00009 
00010 
00011 class BinIO {
00012 public:
00013    static void _read(std::istream &in, void* data, size_t typeSize, size_t length);
00014    
00015    template<class T>
00016    static inline void read(std::istream &in, T* data, int length)
00017    {
00018       _read(in, (void *)data, sizeof(T), length);
00019    }
00020 
00021    static void _write(std::ostream &out, const void* data, size_t typeSize, size_t length);
00022 
00023    template<class T>
00024    static inline void write(std::ostream &out, const T* data, int length)
00025    {
00026       _write(out, (void *)data, sizeof(T), length);
00027    }
00028 
00029 };
00030 
00031 #endif

Generated on Wed Oct 5 14:28:55 2005 for FlowDesigner by  doxygen 1.4.4