This file is indexed.

/usr/include/bakery-2.6/bakery/View/View.h is in libbakery-2.6-dev 2.6.3-0ubuntu1.

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
/*
 * Copyright 2000 Murray Cumming
 *
 * 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 BAKERY_VIEW_H
#define BAKERY_VIEW_H

#include "ViewBase.h"
#include "../Document/Document.h"
#include <sigc++/sigc++.h>

namespace Bakery
{

/** This is a base class which should be multiple-inherited with gtkmm widgets.
  * You should override save_to_document() and load_from_document().
  */
template< class T_Document >
class View : public ViewBase
{
public: 
  View()
  : m_pDocument(0)
  {
  }

  virtual ~View()
  {
  }

  typedef View<T_Document> type_self;

  //typedef typename T_Document type_document;

  virtual T_Document* get_document()
  {
    return m_pDocument;
  }

  virtual const T_Document* get_document() const
  {
    return m_pDocument;
  }

  virtual void set_document(T_Document* pDocument)
  {
    m_pDocument = pDocument;
    if(m_pDocument)
      m_pDocument->signal_forget().connect( sigc::mem_fun(*this, &type_self::on_document_forget) );
  }

  ///Just a convenience, instead of get_docuement()->set_modified().
  virtual void set_modified(bool val = true)
  {
    if(m_pDocument)
      m_pDocument->set_modified(val);
  }

protected:

  void on_document_forget()
  {
    //This should prevent some segfaults:
    m_pDocument = 0;
  }
  
  T_Document* m_pDocument;
};

} //namespace

#endif //BAKERY_VIEW_H