DeviceDescriptor.hh

00001 #ifndef __SUBSCRIPTIONSERVICE__DEVICE_DESCRIPTOR_HH__
00002 #define __SUBSCRIPTIONSERVICE__DEVICE_DESCRIPTOR_HH__
00003 
00004 #include <subsvc-msg.h>
00005 #include <accdevexception.hh>
00006 #include <accdata.hh>
00007 #include <device.hh>
00008 #include <property.hh>
00009 #include <boost/shared_ptr.hpp>
00010 
00011 namespace DeviceAccess
00012 {
00013   namespace Subscription
00014   {
00015     namespace Description
00016     {
00020       struct DeviceDescriptor {
00021         boost::shared_ptr<Device> device; 
00022         Property property;                
00023         AccData para;                     
00024 
00026         void check() const throw(AccDevException)
00027         {
00028           if (device.get() == NULL) {
00029             throw AccDevException(SUBSVC_NULLDEVREF,
00030               SUBSVC_OK,
00031               ACCDEV_ERRORLOCATION);
00032           }
00033           if (property.name().empty()) {
00034             throw AccDevException(SUBSVC_NOPROPNAME,
00035               SUBSVC_OK,
00036               ACCDEV_ERRORLOCATION);
00037           }
00038         }
00039       };
00040     }
00041   }
00042 }
00043 
00044 #endif

Generated on Wed Mar 28 11:50:07 2012 for Subscription Service by  doxygen 1.4.7