This file is indexed.

/usr/include/ossim/imaging/ossimAppFixedTileCache.h is in libossim-dev 1.7.21-4.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
//******************************************************************
//
// License:  LGPL
// 
// See LICENSE.txt file in the top level directory for more details.
//
// Author: Garrett Potts
// 
// Description: This file contains the Application cache algorithm
//
//***********************************
// $Id: ossimAppFixedTileCache.h 14480 2009-05-11 12:07:35Z dburken $
#ifndef ossimAppFixedTileCache_HEADER
#define ossimAppFixedTileCache_HEADER
#include <map>
#include <list>
#include <iostream>
#include <ossim/base/ossimConstants.h>
#include <ossim/base/ossimRefPtr.h>
#include <ossim/base/ossimIrect.h>
#include <OpenThreads/ReadWriteMutex>

class ossimFixedTileCache;
class ossimImageData;

class OSSIM_DLL ossimAppFixedTileCache
{
public:
   friend std::ostream& operator <<(std::ostream& out,
                                    const ossimAppFixedTileCache& rhs);
   static const ossim_uint32 DEFAULT_SIZE;
   typedef ossim_int32 ossimAppFixedCacheId;
   static ossimAppFixedTileCache *instance(ossim_uint32  maxSize   = 0);
   virtual ~ossimAppFixedTileCache();
   
   /*!
    * Will flush all cache registered
    */
   virtual void flush();
   virtual void flush(ossimAppFixedCacheId cacheId);
   virtual void deleteCache(ossimAppFixedCacheId cacheId);
   /*!
    * Will create a new Tile cache for this application if the tile size is 0,0 it will
    * use the default tile size.  Will
    * return 0 if not successful.
    */
   ossimAppFixedCacheId newTileCache(const ossimIrect& tileBoundaryRect,
                                     const ossimIpt& tileSize=ossimIpt(0,0));
   ossimAppFixedCacheId newTileCache();

   virtual void setRect(ossimAppFixedCacheId cacheId,
                        const ossimIrect& boundaryTileRect);
   virtual void setTileSize(ossimAppFixedCacheId cacheId,
                            const ossimIpt& tileSize);
   
   ossimRefPtr<ossimImageData> getTile(ossimAppFixedCacheId cacheId,
                           const ossimIpt& origin);
   ossimRefPtr<ossimImageData> addTile(ossimAppFixedCacheId cacheId,
                                       ossimRefPtr<ossimImageData> data);
   
   ossimRefPtr<ossimImageData> removeTile(ossimAppFixedCacheId cacheId,
                                          const ossimIpt& origin);
   void deleteTile(ossimAppFixedCacheId cacheId,
                   const ossimIpt& origin);
   
   const ossimIpt& getTileSize(ossimAppFixedCacheId cacheId);
   
   virtual void setMaxCacheSize(ossim_uint32 cacheSize);
   
protected:
//    struct ossimAppFixedCacheTileInfo
//    {
//    public:
//       ossimAppFixedCacheTileInfo(ossimAppFixedCacheId appId,
//                                  const ossimIpt& origin)
//          :theAppCacheId(appId),
//           theOrigin(origin)
//          {}
//       ossimAppFixedCacheId  theAppCacheId;
//       ossimIpt       theOrigin;
      
//       bool operator ==(const ossimAppFixedCacheTileInfo &rhs)const
//          {
//             return (theAppCacheId == rhs.theAppCacheId &&
//                     theOrigin     == rhs.theOrigin);
//          } 
//    };
   
   ossimAppFixedTileCache();
   
   ossimFixedTileCache* getCache(ossimAppFixedCacheId cacheId);

   void shrinkGlobalCacheSize(ossim_int32 byteCount);
   void shrinkCacheSize(ossimAppFixedCacheId id,
                        ossim_int32 byteCount);
   void shrinkCacheSize(ossimFixedTileCache* cache,
                        ossim_int32 byteCount);
   void deleteAll();
   
   static ossimAppFixedTileCache *theInstance;
   
   /*!
    * Will hold the current unique Application id.
    */
   static ossimAppFixedCacheId    theUniqueAppIdCounter;
   ossimIpt                       theTileSize;
   ossim_uint32                   theMaxCacheSize;
   ossim_uint32                   theMaxGlobalCacheSize;
   ossim_uint32                   theCurrentCacheSize;

   std::map<ossimAppFixedCacheId, ossimFixedTileCache*> theAppCacheMap;

  OpenThreads::ReadWriteMutex theMutex;
   /*!
    * Is used in an Least recently used algorithm
    */
//   std::list<ossimAppFixedCacheTileInfo>      theUsedQueue;
};

#endif