Free Electron
Terminal.h
Go to the documentation of this file.
1 /* Copyright (C) 2003-2021 Free Electron Organization
2  Any use of this software requires a license. If a valid license
3  was not distributed with this file, visit freeelectron.org. */
4 
5 /** @file */
6 
7 #ifndef __terminal_Terminal_h__
8 #define __terminal_Terminal_h__
9 
10 namespace fe
11 {
12 namespace ext
13 {
14 
15 /**************************************************************************//**
16  @brief respond to a string with a string
17 
18  @ingroup terminal
19 *//***************************************************************************/
20 class FE_DL_EXPORT Terminal:
21  public Component,
22  public Initialize<Terminal>
23 {
24  public:
25  Terminal(void);
26 virtual ~Terminal(void);
27 
28  void initialize(void);
29 
30  String execute(String a_commandline);
31 
32  private:
33 
34  class ComponentInfo
35  {
36  public:
37  ComponentInfo(void):
38  m_serial(0) {}
39 
40  void reset(void)
41  {
42  m_spComponent=NULL;
43  }
44 
45  sp<Component> m_spComponent;
46  String m_typeName;
47  U32 m_serial;
48  std::vector<String> m_inputKey;
49  std::vector<U32> m_inputSerial;
50  };
51 
52  std::string (*m_fpCallback)(std::string);
53  Real m_frame;
54 
55  sp<Scope> m_spScope;
56  std::map<String,TerminalNode> m_nodeMap;
57  std::map<String,ComponentInfo> m_surfaceMap;
58 };
59 
60 } /* namespace ext */
61 } /* namespace fe */
62 
63 #endif /* __terminal_Terminal_h__ */
kernel
Definition: namespace.dox:3
Per-class participation in the Initialized <> mechanism.
Definition: Initialized.h:117
Automatically reference-counted string container.
Definition: String.h:128
Base for all interfacable components.
Definition: Component.h:20
respond to a string with a string
Definition: Terminal.h:20
Intrusive Smart Pointer.
Definition: src/core/ptr.h:53