Open Ephys GUI
 All Classes Functions Variables Pages
AccessClass.h
1 /*
2  ------------------------------------------------------------------
3 
4  This file is part of the Open Ephys GUI
5  Copyright (C) 2012 Open Ephys
6 
7  ------------------------------------------------------------------
8 
9  This program is free software: you can redistribute it and/or modify
10  it under the terms of the GNU General Public License as published by
11  the Free Software Foundation, either version 3 of the License, or
12  (at your option) any later version.
13 
14  This program is distributed in the hope that it will be useful,
15  but WITHOUT ANY WARRANTY; without even the implied warranty of
16  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17  GNU General Public License for more details.
18 
19  You should have received a copy of the GNU General Public License
20  along with this program. If not, see <http://www.gnu.org/licenses/>.
21 
22 */
23 
24 #ifndef __ACCESSCLASS_H_CE1DC2DE__
25 #define __ACCESSCLASS_H_CE1DC2DE__
26 
27 #include "../JuceLibraryCode/JuceHeader.h"
28 
29 class UIComponent;
30 class EditorViewport;
31 class ProcessorList;
32 class DataViewport;
33 class ProcessorGraph;
34 class MessageCenter;
35 class ControlPanel;
36 class AudioComponent;
37 
38 
39 /**
40 
41  Allows subclasses to access important pointers within the application.
42 
43  @see UIComponent
44 
45 */
46 
47 class AccessClass : public ActionBroadcaster
48 {
49 public:
50 
51  AccessClass() { }
52  ~AccessClass() { }
53 
54  void setUIComponent(UIComponent*);
55 
56  virtual void updateChildComponents() {}
57 
58  EditorViewport* getEditorViewport() {return ev;}
59  DataViewport* getDataViewport() {return dv;}
60  ProcessorList* getProcessorList() {return pl;}
61  ProcessorGraph* getProcessorGraph() {return pg;}
62  ControlPanel* getControlPanel() {return cp;}
63  MessageCenter* getMessageCenter() {return mc;}
64  UIComponent* getUIComponent() {return ui;}
65  AudioComponent* getAudioComponent() {return ac;}
66 
67 private:
68 
69  UIComponent* ui;
70  EditorViewport* ev;
71  ProcessorList* pl;
72  DataViewport* dv;
73  ProcessorGraph* pg;
74  ControlPanel* cp;
75  MessageCenter* mc;
76  AudioComponent* ac;
77 
78 };
79 
80 
81 #endif // __ACCESSCLASS_H_CE1DC2DE__