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

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

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

revision 3915 by schoenebeck, Mon Jun 7 18:57:17 2021 UTC revision 3920 by schoenebeck, Sun Jun 13 15:56:31 2021 UTC
# Line 44  Line 44 
44  # endif  # endif
45  #endif  #endif
46    
47    #ifdef __GNUC__
48    # define LIBGIG_DEPRECATED(msg) __attribute__ ((deprecated(msg)))
49    #else
50    # define LIBGIG_DEPRECATED
51    #endif
52    
53  #include <string>  #include <string>
54  #include <list>  #include <list>
55  #include <map>  #include <map>
# Line 318  namespace RIFF { Line 324  namespace RIFF {
324              List(File* pFile, file_offset_t StartPos, List* Parent);              List(File* pFile, file_offset_t StartPos, List* Parent);
325              String       GetListTypeString() const;              String       GetListTypeString() const;
326              uint32_t     GetListType() const { return ListType; } ///< Returns unsigned integer representation of the list's ID              uint32_t     GetListType() const { return ListType; } ///< Returns unsigned integer representation of the list's ID
327                Chunk*       GetSubChunkAt(size_t pos);
328              Chunk*       GetSubChunk(uint32_t ChunkID);              Chunk*       GetSubChunk(uint32_t ChunkID);
329                List*        GetSubListAt(size_t pos);
330              List*        GetSubList(uint32_t ListType);              List*        GetSubList(uint32_t ListType);
331              Chunk*       GetFirstSubChunk();              Chunk*       GetFirstSubChunk() LIBGIG_DEPRECATED("Use GetSubChunkAt() instead.");
332              Chunk*       GetNextSubChunk();              Chunk*       GetNextSubChunk() LIBGIG_DEPRECATED("Use GetSubChunkAt() instead.");
333              List*        GetFirstSubList();              List*        GetFirstSubList() LIBGIG_DEPRECATED("Use GetSubListAt() instead.");
334              List*        GetNextSubList();              List*        GetNextSubList() LIBGIG_DEPRECATED("Use GetSubListAt() instead.");
335              size_t       CountSubChunks();              size_t       CountSubChunks();
336              size_t       CountSubChunks(uint32_t ChunkID);              size_t       CountSubChunks(uint32_t ChunkID);
337              size_t       CountSubLists();              size_t       CountSubLists();
# Line 336  namespace RIFF { Line 344  namespace RIFF {
344              virtual ~List();              virtual ~List();
345          protected:          protected:
346              typedef std::map<uint32_t, RIFF::Chunk*>  ChunkMap;              typedef std::map<uint32_t, RIFF::Chunk*>  ChunkMap;
347              typedef std::list<Chunk*>                 ChunkList;              typedef std::vector<Chunk*>               ChunkList;
348              typedef std::set<Chunk*>                  ChunkSet;              typedef std::set<Chunk*>                  ChunkSet;
349    
350              uint32_t   ListType;              uint32_t   ListType;
# Line 406  namespace RIFF { Line 414  namespace RIFF {
414                  stream_mode_t Mode; ///< State of handles (ro, rw, closed).                  stream_mode_t Mode; ///< State of handles (ro, rw, closed).
415              };              };
416              struct IO : HandlePair {              struct IO : HandlePair {
417                    bool isPerThread; ///< Whether SetIOPerThread(true) was called.
418                  mutable std::map<std::thread::id,HandlePair> byThread; ///< Optional: Individual file handle pair for each thread separately.                  mutable std::map<std::thread::id,HandlePair> byThread; ///< Optional: Individual file handle pair for each thread separately.
419                  mutable std::mutex mutex; ///< For protecting concurrent changes on the @c byThread map itself and replacing handles.                  mutable std::mutex mutex; ///< For protecting concurrent changes on the @c byThread map itself and replacing handles.
420              } io;              } io;
# Line 434  namespace RIFF { Line 443  namespace RIFF {
443              int FileOffsetSizeFor(file_offset_t fileSize) const;              int FileOffsetSizeFor(file_offset_t fileSize) const;
444              void Cleanup();              void Cleanup();
445              HandlePair& FileHandlePairUnsafeRef();              HandlePair& FileHandlePairUnsafeRef();
446                bool SetModeInternal(stream_mode_t NewMode, bool* pResetPos);
447      };      };
448    
449      /**      /**

Legend:
Removed from v.3915  
changed lines
  Added in v.3920

  ViewVC Help
Powered by ViewVC