|   | 739 | Since the app Demosw will behave more like a switch, I used the switch code for reference. Here's the skeleton based on the switch app code, but for my app (if it ever happens...) | 
          
          
            |   | 740 |  | 
          
          
            |   | 741 | {{{ | 
          
          
            |   | 742 | #include "component.hh" | 
          
          
            |   | 743 | #include "vlog.hh" //for logging purposes -> src/include/vlog.hh | 
          
          
            |   | 744 |  | 
          
          
            |   | 745 | //need to spec user custom structs here | 
          
          
            |   | 746 |  | 
          
          
            |   | 747 | Vlog_module log("demosw");  | 
          
          
            |   | 748 |  | 
          
          
            |   | 749 | class Demosw | 
          
          
            |   | 750 |         : public Component | 
          
          
            |   | 751 | { | 
          
          
            |   | 752 | public: | 
          
          
            |   | 753 |         Demosw(const Context* c, | 
          
          
            |   | 754 |                 const xercesc::DOMNode*) | 
          
          
            |   | 755 |                 : Component(c) { } | 
          
          
            |   | 756 |  | 
          
          
            |   | 757 |         void configure(const Configuration*); | 
          
          
            |   | 758 |  | 
          
          
            |   | 759 |         void install(); | 
          
          
            |   | 760 |  | 
          
          
            |   | 761 |         //Disposition defined in component.hh, ref. src/nox/ | 
          
          
            |   | 762 |         Disposition handle(const Event&); | 
          
          
            |   | 763 | private: | 
          
          
            |   | 764 |          | 
          
          
            |   | 765 | }; | 
          
          
            |   | 766 |  | 
          
          
            |   | 767 | void Demosw::configure(const Configuration* conf) | 
          
          
            |   | 768 | { | 
          
          
            |   | 769 |  | 
          
          
            |   | 770 | } | 
          
          
            |   | 771 |  | 
          
          
            |   | 772 | void Demosw::install() | 
          
          
            |   | 773 | { | 
          
          
            |   | 774 |  | 
          
          
            |   | 775 | } | 
          
          
            |   | 776 |  | 
          
          
            |   | 777 | Disposition Demosw::handle(const Event& evt) //returns either CONTINUE or STOP | 
          
          
            |   | 778 | { | 
          
          
            |   | 779 |  | 
          
          
            |   | 780 | } | 
          
          
            |   | 781 |  | 
          
          
            |   | 782 | REGISTER_COMPONENT(container::Simple_component_factory<Demosw>, Demosw); | 
          
          
            |   | 783 | }}} |