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

ExifTypes.hpp

Go to the documentation of this file.
00001 /*
00002     libglim: a C++ Free library render images using OpenGL
00003     Copyright (C) 2002 Nestal Wan
00004 
00005     This library is free software; you can redistribute it and/or
00006     modify it under the terms of the GNU General Public License
00007     as published by the Free Software Foundation; either
00008     version 2 of the License, or (at your option) any later version.
00009 
00010     This library is distributed in the hope that it will be useful,
00011     but WITHOUT ANY WARRANTY; without even the implied warranty of
00012     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013     General Public License for more details.
00014 
00015     You should have received a copy of the GNU General Public
00016     License along with this library; if not, write to the Free Software
00017     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00018 */
00026 #ifndef __PICINFO_EXIF_TYPES_HEADER_INCLUDED__
00027 #define __PICINFO_EXIF_TYPES_HEADER_INCLUDED__
00028 
00029 #ifndef __PICINFO_CSTDINT_HEADER_INCLUDED__
00030 #include "cstdint.hpp"
00031 #endif
00032 
00033 #include <cstddef>
00034 #include <string>
00035 #include <vector>
00036 
00037 namespace picinfo {
00038 
00039 typedef uint16_t    tag_t ;
00040 
00044 struct ValueMap
00045 {
00046     uint32_t    value ;
00047     const char  *name ;
00048 } ;
00049 
00053 enum TagType
00054 {
00055     byte = 1, ascii, ushort, ulong, urational, sbyte, undefined, sshort,
00056     slong, srational,
00057     
00058     // not appear in EXIF 2.2 spec
00059     sfloat, dfloat,
00060     
00061     // number of types or invalid type
00062     no_type
00063 
00064 } ;
00065 
00068 enum TypeMask
00069 {
00070     byte_mask       = 1 << byte,
00071     ascii_mask      = 1 << ascii,
00072     ushort_mask     = 1 << ushort,
00073     ulong_mask      = 1 << ulong,
00074     urat_mask       = 1 << urational,
00075     sbyte_mask      = 1 << sbyte,
00076     undef_mask      = 1 << undefined,
00077     sshort_mask     = 1 << sshort,
00078     slong_mask      = 1 << slong,
00079     srat_mask       = 1 << srational,
00080     sfloat_mask     = 1 << sfloat,
00081     dfloat_mask     = 1 << dfloat,
00082 } ;
00083 
00084 // convinient macro for getting array size
00085 #define COUNT( array ) ( sizeof(array) / sizeof(array[0]) )
00086 
00087 } // end of namespace
00088 
00089 #endif

Generated on Fri Jan 13 23:38:12 2006 for picinfo by  doxygen 1.4.4