This file is indexed.

/usr/include/PajeSimulator.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
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
/*
    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 __PAJESIMULATOR_H__
#define __PAJESIMULATOR_H__
#include <map>
#include <vector>
#include <sstream>
#include <string>
#include <iostream>
#include <fstream>
#include <typeinfo>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "PajeTraceEvent.h"
#include "PajeEvent.h"
#include "PajeType.h"
#include "PajeContainer.h"
#include "PajeComponent.h"

#define CALL_MEMBER_PAJE_SIMULATOR(object,ptr) ((object).*(ptr))

class PajeSimulator : public PajeComponent {
private:
  PajeContainerType *rootType;
  PajeContainer *root;
  std::map<std::string,PajeType*> typeMap;
  std::map<std::string,PajeType*> typeNamesMap; //for names
  std::map<std::string,PajeContainer*> contMap;
  std::map<std::string,PajeContainer*> contNamesMap; //for names


  double stopSimulationAtTime;

  void init (void);

private:
  //for time-slice selection (used by time aggregation)
  double selectionStart;
  double selectionEnd;
  bool noImbrication;

protected:
  double lastKnownTime;
  virtual void setLastKnownTime (PajeTraceEvent *event);
  PajeColor *getColor (std::string color, PajeTraceEvent *event);

public:
  PajeSimulator();
  PajeSimulator(double stopat);
  PajeSimulator(double stopat, int ignoreIncompleteLinks);
  PajeSimulator(double stopat, int ignoreIncompleteLinks, bool noImbrication);
  ~PajeSimulator();
  void report (void);
  void reportDotFormat (void);
  void reportContainer (void);
  bool keepSimulating (void);
  bool noImbricationLevel (void);
  
  void inputEntity (PajeObject *data);
  void startReading (void);
  void finishedReading (void);

private:
  void (PajeSimulator::*invocation[PajeEventIdCount])(PajeTraceEvent*);

  void pajeDefineContainerType (PajeTraceEvent *event);
  void pajeDefineLinkType (PajeTraceEvent *event);
  void pajeDefineEventType (PajeTraceEvent *event);
  void pajeDefineStateType (PajeTraceEvent *event);
  void pajeDefineVariableType (PajeTraceEvent *event);
  void pajeDefineEntityValue (PajeTraceEvent *event);

  void pajeCreateContainer (PajeTraceEvent *event);
  void pajeDestroyContainer (PajeTraceEvent *event);

  void pajeNewEvent (PajeTraceEvent *event);

  void pajeSetState (PajeTraceEvent *event);
  void pajePushState (PajeTraceEvent *event);
  void pajePopState (PajeTraceEvent *event);
  void pajeResetState (PajeTraceEvent *event);

  void pajeSetVariable (PajeTraceEvent *event);
  void pajeAddVariable (PajeTraceEvent *event);
  void pajeSubVariable (PajeTraceEvent *event);

  void pajeStartLink (PajeTraceEvent *event);
  void pajeEndLink (PajeTraceEvent *event);

  void pajeTraceFile (PajeTraceEvent *event); //suport for multiple files

public:
  //commands
  void setSelectionStartEndTime (double start, double end);

  //
  // Queries
  // -----------------------------------------------------------------
  // Messages sent by viewers or filters to the filter preceeding it.
  // These messages ask for some information about the loaded trace.
  //

  // The entity at the root of the hierarchy
  PajeContainer *rootInstance (void);

  // The type of the entity at the root of the hierarchy
  PajeType *rootEntityType (void);

  // Array of types that are directly under given type in hierarchy
  std::vector<PajeType*> containedTypesForContainerType (PajeType *type);

  // All containers contained by container
  std::vector<PajeContainer*> enumeratorOfContainersInContainer (PajeContainer *container);

  // All containers of a given type contained by container. Container must be
  // of a type ancestral of entityType in the hierarchy.
  std::vector<PajeContainer*> enumeratorOfContainersTypedInContainer (PajeType *type, PajeContainer *container);

  // All entities of a given type that are in a container in a certain
  // time interval.
  std::vector<PajeEntity*> enumeratorOfEntitiesTypedInContainer (PajeType *type, PajeContainer *container, double start, double end);

  // Tells if type is a container type
  bool isContainerType (PajeType *type);

  // Tells if type is a variable type
  bool isVariableType (PajeType *type);

  // The time period of the trace
  double startTime (void);
  double endTime (void);

  // The time selection
  double selectionStartTime (void);
  double selectionEndTime (void);

  // The type of the entity with the given name
  PajeType *entityTypeWithName (std::string name);

  // The container with the given name
  PajeContainer *containerWithName (std::string name);

  // Color of given value of entity type
  PajeColor *colorForValueOfEntityType (PajeType *type, PajeValue *value);

  // Color for all entities of given type (used for "variable" entity type).
  PajeColor *colorForEntityType (PajeType *type);

  // All values an entity of given type can have.
  std::vector<PajeValue*> valuesForEntityType (PajeType *type);

  // Spatial/time integration queries
  PajeAggregatedDict timeIntegrationOfTypeInContainer (PajeType *type, PajeContainer *container);
  PajeAggregatedDict integrationOfContainer (PajeContainer *container);
  PajeAggregatedDict spatialIntegrationOfContainer (PajeContainer *container);
};
#endif