UpdateProcessor_T.cpp

Go to the documentation of this file.
00001 /*
00002  *
00003  *
00004  * Distributed under the OpenDDS License.
00005  * See: http://www.opendds.org/license.html
00006  */
00007 
00008 #ifndef UPDATEPROCESSOR_T_CPP
00009 #define UPDATEPROCESSOR_T_CPP
00010 
00011 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00012 #pragma once
00013 #endif /* ACE_LACKS_PRAGMA_ONCE */
00014 
00015 #include "DcpsInfo_pch.h"
00016 #include "dds/DCPS/debug.h"
00017 #include "UpdateProcessor_T.h"
00018 
00019 OPENDDS_BEGIN_VERSIONED_NAMESPACE_DECL
00020 
00021 namespace OpenDDS {
00022 namespace Federator {
00023 
00024 template<class DataType>
00025 UpdateProcessor<DataType>::UpdateProcessor()
00026 {
00027   if (OpenDDS::DCPS::DCPS_debug_level > 0) {
00028     ACE_DEBUG((LM_DEBUG,
00029                ACE_TEXT("(%P|%t) UpdateProcessor::UpdateProcessor()\n")));
00030   }
00031 }
00032 
00033 template<class DataType>
00034 UpdateProcessor<DataType>::~UpdateProcessor()
00035 {
00036   if (OpenDDS::DCPS::DCPS_debug_level > 0) {
00037     ACE_DEBUG((LM_DEBUG,
00038                ACE_TEXT("(%P|%t) UpdateProcessor::~UpdateProcessor()\n")));
00039   }
00040 }
00041 
00042 template<class DataType>
00043 void
00044 UpdateProcessor<DataType>::processSample(
00045   const DataType*          sample,
00046   const DDS::SampleInfo* info)
00047 {
00048   if (OpenDDS::DCPS::DCPS_debug_level > 0) {
00049     ACE_DEBUG((LM_DEBUG,
00050                ACE_TEXT("(%P|%t) UpdateProcessor::processSample()\n")));
00051   }
00052 
00053   if (info->valid_data) {
00054     switch (sample->action) {
00055     case CreateEntity:
00056       this->processCreate(sample, info);
00057       break;
00058     case UpdateQosValue1:
00059       this->processUpdateQos1(sample, info);
00060       break;
00061     case UpdateQosValue2:
00062       this->processUpdateQos2(sample, info);
00063       break;
00064     case UpdateFilterExpressionParams:
00065       this->processUpdateFilterExpressionParams(sample, info);
00066       break;
00067     case DestroyEntity:
00068       this->processDelete(sample, info);
00069       break;
00070     default:
00071       ACE_ERROR((LM_ERROR,
00072                  ACE_TEXT("(%P|%t) ERROR: UpdateProcessor::processSample() - ")
00073                  ACE_TEXT("upsupported action type: %d.\n"),
00074                  sample->action));
00075       break;
00076     }
00077 
00078   } else {
00079     if (OpenDDS::DCPS::DCPS_debug_level > 0) {
00080       ACE_DEBUG((LM_DEBUG,
00081                  ACE_TEXT("(%P|%t) UpdateProcessor::processSample() - ")
00082                  ACE_TEXT("sample not valid, declining to process.\n")));
00083     }
00084   }
00085 }
00086 
00087 template<class DataType>
00088 void
00089 UpdateProcessor<DataType>::processUpdateQos2(
00090   const DataType*          /* sample */,
00091   const DDS::SampleInfo* /* info */)
00092 {
00093   /* This method intentionally left unimplemented. */
00094 }
00095 
00096 template<class DataType>
00097 void
00098 UpdateProcessor<DataType>::processUpdateFilterExpressionParams(
00099   const DataType*        /* sample */,
00100   const DDS::SampleInfo* /* info */)
00101 {
00102   /* This method intentionally left unimplemented. */
00103 }
00104 
00105 } // namespace Federator
00106 } // namespace OpenDDS
00107 
00108 OPENDDS_END_VERSIONED_NAMESPACE_DECL
00109 
00110 #endif /* UPDATEPROCESSOR_T_CPP */
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 10 Aug 2018 for OpenDDS by  doxygen 1.6.1