<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE poco-application-context 
	SYSTEM "http://www.pocomatic.com/poco-application-context.dtd">

<poco-application-context id="my-gps-device">
   <!-- 
        setup the ticket generator, and connect the locator to it:
 
        tick_gen = new TickGenImpl(10, 1); // 10 pulses, interval = 1 sec
        tick_gen->subscribe(gps_locator);

        tick_gen->start(); 
   --> 
   <load library="./TickGenImpl.$dll"/>
   <bean id="tick-gen"
         class="TickGenImpl"
         destroy-method="delete" 
         lazy-init="false">
        <method-arg type="short" value="10"/>
	<method-arg type="short" value="1"/>
        <ioc method="subscribe">
             <method-arg ref="gps-locator"/>
        </ioc>

	<ioc method="start"/>
   </bean>

   <!-- 
        setup the gps locator, and connect the display to it:
      
        gps_locator = new GPSLocatorImpl();
        gps_locator->subscribe(nav_display);
   -->
   <load library="./GPSLocatorImpl.$dll"/>
   <bean id="gps-locator"
         class="GPSLocatorImpl"
         destroy-method="delete">
         <ioc method="subscribe">
             <method-arg ref="nav-display"/>
         </ioc>
   </bean>

   <!-- 
        setup the display, that gets pos from 
        the gps-locator on refresh event:
   
        nav_display = new NavDisplayImpl(gps_locator); 
   -->
   <load library="./NavDisplayImpl.$dll"/>
   <bean id="nav-display"
         class="NavDisplayImpl"
         destroy-method="delete">
        <method-arg ref="gps-locator"/>
   </bean>

   <load library="./reflx.$dll"/>
</poco-application-context>
