| 708 |   |   | 
          
          
            |   | 708 |  | 
          
          
            |   | 709 | '''the app'''[[BR]] | 
          
          
            |   | 710 | Now comes the part of understanding the app. The nox app is based on the component class, described in component.hh (found in ./src/nox/, assuming you're in your nox directory), so you must always include this file. the basic structure of an app is as followed:  | 
          
          
            |   | 711 |  | 
          
          
            |   | 712 | {{{ | 
          
          
            |   | 713 | #include "component.hh" | 
          
          
            |   | 714 |  | 
          
          
            |   | 715 | class Hub | 
          
          
            |   | 716 |     : public Component | 
          
          
            |   | 717 | { | 
          
          
            |   | 718 | public: | 
          
          
            |   | 719 |      Hub(const Context* c, | 
          
          
            |   | 720 |          const xercesc::DOMNode*) | 
          
          
            |   | 721 |          : Component(c) { } | 
          
          
            |   | 722 |  | 
          
          
            |   | 723 |     void configure(const Configuration*) { | 
          
          
            |   | 724 |     } | 
          
          
            |   | 725 |  | 
          
          
            |   | 726 |     void install() | 
          
          
            |   | 727 |     { } | 
          
          
            |   | 728 | }; | 
          
          
            |   | 729 |  | 
          
          
            |   | 730 | REGISTER_COMPONENT(container::Simple_component_factory<Hub>, Hub); | 
          
          
            |   | 731 | }}}    | 
          
          
            |   | 732 |  | 
          
          
            |   | 733 | this is just a stripped down version of the hub code. Most nox apps can be found in ./src/nox/coreapps/. To debug, also include vlog.hh to enable log, warning and other messages. vlog.hh and other important functionalities, called "events" are in ./src/include. | 
          
          
            |   | 734 |  | 
          
          
            |   | 735 | Events must be registered through the Disposition handler, which returns either STOP or CONTINUE, as defined in event.hh.   | 
          
          
            |   | 736 |  | 
          
          
            |   | 737 |      |