This file is indexed.

/usr/include/trilinos/RTC_BlockRTC.hh is in libtrilinos-pamgen-dev 12.12.1-5.

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
#ifndef _BLOCKRTC_H
#define _BLOCKRTC_H

#include "RTC_ExecutableRTC.hh"
#include "RTC_TokenizerRTC.hh"
#include "RTC_VariableRTC.hh"

#include <string>
#include <map>
#include <list>
#include <iostream>

namespace PG_RuntimeCompiler {

/**
 * The Block class represents a block of code. A block of code begins with
 * a { and ends with a }. Blocks of code can contain Lines of code and other
 * blocks of code which are its sub-blocks. Sub-blocks of code will have
 * access to all the variables that its parent has access to. Block extends
 * Executable because a Block of code can be executed.
 */

class Block: public Executable
{
 public:

  /**
   * Constructor -> Initializes instance variables
   *
   * @param vars - A list of vars that are already active (in scope) at the
   *               time this Block was created
   */
  Block(const std::map<std::string, Variable*>& vars);

  /**
   * Destructor -> The destructor will call the delete every statement in the
   *               Block. It will also delete all of the variables that were
   *               declared inside this Block.
   */
  virtual ~Block();

  /**
   * addStatement -> This method adds a statement object to statement list
   *
   * @param statement - The statement we are adding
   */
  void addStatement(Executable* statement);

  /**
   * addVariable -> This method adds the a variable to the variable list
   *
   * @param var - The variable we are adding
   */
  void addVariable(Variable* var);

  /**
   * getVar -> The method returns a variable with matching name.
   *           If no such variable exists, NULL is returned.
   *
   * @param name - The name of the variable we are looking for
   */
  Variable* getVar(const std::string& name);

  /**
   * createSubStatements -> Looks at each line until it sees the closing }. It
   *                        will create and add the sublines and substatements
   *                        of this block
   *
   * @param lines - The lines of code
   * @param errs  - A string containing errors
   */
  void createSubStatements(Tokenizer& lines, std::string& errs);

  std::ostream& operator<<(std::ostream& os) const;

 private:

  std::list<Variable*> _varsIOwn; /**!< A list of variables that this block
                                   *    created and therefore is responsible
                                   *    for deleting.
                                   */

  static int indent;

 protected:

  std::list<Executable*> _statements; /**!< A list of executable objects
                                       *    contained by this block. These
                                       *    objects may be Lines of code or
                                       *    other Blocks. When a Block of code
                                       *    is executed, it will execute all
                                       *    the objects in its _statements list
                                       */

  std::map<std::string, Variable*> _vars; /**!< The map of available variables
                                           *    for this Block. When a variable
                                           *    is declared, it's added to this
                                           *    list. It maps names to Variable
                                           *    objects.
                                           */
};

}
#endif