This file is indexed.

/usr/include/PajeContainer.h is in libpaje-dev 1.3.4-2.

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
/*
    This file is part of PajeNG

    PajeNG is free software: you can redistribute it and/or modify
    it under the terms of the GNU Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    PajeNG 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 Public License for more details.

    You should have received a copy of the GNU Public License
    along with PajeNG. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __PAJE_CONTAINER_H
#define __PAJE_CONTAINER_H
#include <map>
#include <vector>
#include <algorithm>
#include <string>
#include "PajeType.h"
#include "PajeTraceEvent.h"
#include "PajeEvent.h"
#include "PajeEntity.h"

class PajeContainer;
class PajeEvent;

class PajeContainer : public PajeNamedEntity {
private:
  double stopSimulationAtTime;
  void (PajeContainer::*invocation[PajeEventIdCount])(PajeEvent *);
  bool _destroyed;
  bool noImbrication;

public:
  std::string _alias;
  std::map<std::string,PajeContainer*> children;
  int depth;

private:
  std::map<PajeType*,std::set<std::string> > linksUsedKeys; //all used keys for this container
  std::map<PajeType*,std::map<std::string,PajeUserLink*> > pendingLinks; //all pending links
  std::map<PajeType*,std::vector<PajeUserState*> > stackStates; //the simulation stack for state types

  //keeps all simulated entities (variables, links, states and events)
  std::map<PajeType*,std::vector<PajeEntity*> > entities;

private:
  void init (std::string alias, PajeContainer *parent);

public:
  PajeContainer (double time, std::string name, std::string alias, PajeContainer *parent, PajeType *type, PajeTraceEvent *event);
  PajeContainer (double time, std::string name, std::string alias, PajeContainer *parent, PajeType *type, PajeTraceEvent *event, double stopat);
  PajeContainer (double time, std::string name, std::string alias, PajeContainer *parent, PajeType *type, PajeTraceEvent *event, double stopat, bool noImbrication);
  ~PajeContainer ();
  int numberOfEntities (void); //recursive
  std::string description (void) const;
  const std::string &identifier (void);
  bool isContainer (void) const;
  PajeContainer *getRoot (void);
  std::vector<PajeContainer*> getChildren (void);
  bool isAncestorOf (PajeContainer *c);
  bool keepSimulating (void);

  //entry method
  void demuxer (PajeEvent *event);

  //Simulator events (not treated by demuxer yet)
  PajeContainer *pajeCreateContainer (double time, PajeType *type, PajeTraceEvent *event, double stopat, bool noImbrication);
  void pajeDestroyContainer (double time, PajeEvent *event);
private:
  //Simulator events
  void pajeNewEvent (PajeEvent *event);
  void pajeSetState (PajeEvent *event);
  void pajePushState (PajeEvent *event);
  void pajePopState (PajeEvent *event);
  void pajeResetState (PajeEvent *event);
  void pajeSetVariable (PajeEvent *event);
  void pajeAddVariable (PajeEvent *event);
  void pajeSubVariable (PajeEvent *event);
  void pajeStartLink (PajeEvent *event);
  void pajeEndLink (PajeEvent *event);
  void pajeDestroyContainer (PajeEvent *event);

private:
  void destroy (double time);

public:
  void recursiveDestroy (double time); //not a PajeSimulator event, EOF found

  //queries
  std::vector<PajeEntity*> enumeratorOfEntitiesTyped (double start, double end, PajeType *type);
  PajeAggregatedDict timeIntegrationOfTypeInContainer (double start, double end, PajeType *type);
  PajeAggregatedDict timeIntegrationOfStateTypeInContainer (double start, double end, PajeType *type);
  PajeAggregatedDict timeIntegrationOfVariableTypeInContainer (double start, double end, PajeType *type);
  PajeAggregatedDict integrationOfContainer (double start, double end);
  PajeAggregatedDict spatialIntegrationOfContainer (double start, double end);

private:
  PajeAggregatedDict merge (PajeAggregatedDict a,
                            PajeAggregatedDict b);
  PajeAggregatedDict add (PajeAggregatedDict a,
                          PajeAggregatedDict b);
  bool checkTimeOrder (PajeEvent *event);
  bool checkTimeOrder (double time, PajeType *type, PajeTraceEvent *traceEvent);
  bool checkPendingLinks (void);


private:
  double selectionStart;
  double selectionEnd;
  PajeAggregatedDict spatialAggregated;
};

std::ostream &operator<< (std::ostream &output, const PajeContainer &container);

#endif