This file is indexed.

/usr/include/crystalspace-2.0/iengine/collection.h is in libcrystalspace-dev 2.0+dfsg-1build1.

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
121
122
123
/*
Copyright (C) 2008 by Jorrit Tyberghein and Michael Gist

This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Library General Public License for more details.

You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/

#ifndef __IENGINE_COLLECTION_H__
#define __IENGINE_COLLECTION_H__

/**\file
 * Collection management
 */

#include "iutil/array.h"
#include "csutil/scf.h"

struct iCameraPosition;
struct iMaterialWrapper;
struct iMeshWrapper;
struct iMeshFactoryWrapper;
struct iObject;
struct iSector;
struct iTextureWrapper;
struct iShader;

/**
 * A collection is used to store related objects in a simple structure
 * to guarentee that they won't be freed by the engine and to help management.
 */

struct iCollection : public virtual iBase
{
  SCF_INTERFACE(iCollection, 1,0,0);

 /**
  * Get the iObject for this collection.
  */
  virtual iObject *QueryObject() = 0;

  /**
   * Add an object to this collection.
   */
  virtual void Add(iObject *obj) = 0;

  /**
   * Remove an object from this collection.
   */
  virtual void Remove(iObject *obj) = 0;

  /**
   * Release all references to objects held by this collection.
   */
  virtual void ReleaseAllObjects(bool debug = false) = 0;

  /**
   * Returns true if this collection is the parent of the object passed.
   */
  virtual bool IsParentOf(iObject* obj) = 0;

  /**
   * Find the sector with the given name in this collection. Returns
   * nullptr if the sector is not found.
   */
  virtual iSector* FindSector(const char *name) = 0;
  
  /**
   * Find the mesh with the given name in this collection. Returns
   * nullptr if the mesh is not found.
   */
  virtual iMeshWrapper* FindMeshObject(const char *name) = 0;

  /**
   * Find the mesh factory with the given name in this collection. Returns
   * nullptr if the mesh factory is not found.
   */
  virtual iMeshFactoryWrapper* FindMeshFactory (const char *name) = 0;

  /**
   * Find the texture with the given name in this collection. Returns
   * nullptr if the texture is not found.
   */
  virtual iTextureWrapper* FindTexture(const char *name) = 0;

  /**
   * Find the material with the given name in this collection. Returns
   * nullptr if the material is not found.
   */
  virtual iMaterialWrapper* FindMaterial(const char *name) = 0;

  /**
   * Find the shader with the given name in this collection. Returns
   * nullptr if the shader is not found.
   */
  virtual iShader* FindShader(const char *name) = 0;

  /**
   * Find the camera position with the given name in this collection. Returns
   * nullptr if the camera position is not found.
   */
  virtual iCameraPosition* FindCameraPosition(const char *name) = 0;
};

/**
 * Used for a readonly array of csRef<iCollection>.
 */
struct iCollectionArray : public iArrayReadOnly<csRef<iCollection> >
{
  SCF_IARRAYREADONLY_INTERFACE (iCollectionArray);
};

#endif // __IENGINE_COLLECTION_H__