/[svn]/libgig/trunk/src/RIFF.cpp
ViewVC logotype

Diff of /libgig/trunk/src/RIFF.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1105 by schoenebeck, Sun Mar 18 19:32:42 2007 UTC revision 1207 by persson, Sat May 26 13:59:40 2007 UTC
# Line 1364  namespace RIFF { Line 1364  namespace RIFF {
1364       * "from scratch". Note: there must be no empty chunks or empty list       * "from scratch". Note: there must be no empty chunks or empty list
1365       * chunks when trying to make the new RIFF file persistent with Save()!       * chunks when trying to make the new RIFF file persistent with Save()!
1366       *       *
1367         * Note: by default, the RIFF file will be saved in native endian
1368         * format; that is, as a RIFF file on little-endian machines and
1369         * as a RIFX file on big-endian. To change this behaviour, call
1370         * SetByteOrder() before calling Save().
1371         *
1372       * @param FileType - four-byte identifier of the RIFF file type       * @param FileType - four-byte identifier of the RIFF file type
1373       * @see AddSubChunk(), AddSubList()       * @see AddSubChunk(), AddSubList(), SetByteOrder()
1374       */       */
1375      File::File(uint32_t FileType) : List(this) {      File::File(uint32_t FileType) : List(this) {
1376          #if defined(WIN32)          #if defined(WIN32)
# Line 1527  namespace RIFF { Line 1532  namespace RIFF {
1532          return false;          return false;
1533      }      }
1534    
1535        /** @brief Set the byte order to be used when saving.
1536         *
1537         * Set the byte order to be used in the file. A value of
1538         * endian_little will create a RIFF file, endian_big a RIFX file
1539         * and endian_native will create a RIFF file on little-endian
1540         * machines and RIFX on big-endian machines.
1541         *
1542         * @param Endian - endianess to use when file is saved.
1543         */
1544        void File::SetByteOrder(endian_t Endian) {
1545            #if WORDS_BIGENDIAN
1546            bEndianNative = Endian != endian_little;
1547            #else
1548            bEndianNative = Endian != endian_big;
1549            #endif
1550        }
1551    
1552      /** @brief Save changes to same file.      /** @brief Save changes to same file.
1553       *       *
1554       * Make all changes of all chunks persistent by writing them to the       * Make all changes of all chunks persistent by writing them to the

Legend:
Removed from v.1105  
changed lines
  Added in v.1207

  ViewVC Help
Powered by ViewVC