OpenDDS  Snapshot(2023/04/28-20:55)
UpdateProcessor_T.cpp
Go to the documentation of this file.
1 /*
2  *
3  *
4  * Distributed under the OpenDDS License.
5  * See: http://www.opendds.org/license.html
6  */
7 
8 #ifndef UPDATEPROCESSOR_T_CPP
9 #define UPDATEPROCESSOR_T_CPP
10 
11 #if !defined (ACE_LACKS_PRAGMA_ONCE)
12 #pragma once
13 #endif /* ACE_LACKS_PRAGMA_ONCE */
14 
15 #include "DcpsInfo_pch.h"
16 #include "dds/DCPS/debug.h"
17 #include "UpdateProcessor_T.h"
18 
20 
21 namespace OpenDDS {
22 namespace Federator {
23 
24 template<class DataType>
26 {
29  ACE_TEXT("(%P|%t) UpdateProcessor::UpdateProcessor()\n")));
30  }
31 }
32 
33 template<class DataType>
35 {
38  ACE_TEXT("(%P|%t) UpdateProcessor::~UpdateProcessor()\n")));
39  }
40 }
41 
42 template<class DataType>
43 void
45  const DataType* sample,
46  const DDS::SampleInfo* info)
47 {
50  ACE_TEXT("(%P|%t) UpdateProcessor::processSample()\n")));
51  }
52 
53  if (info->valid_data) {
54  switch (sample->action) {
55  case CreateEntity:
56  this->processCreate(sample, info);
57  break;
58  case UpdateQosValue1:
59  this->processUpdateQos1(sample, info);
60  break;
61  case UpdateQosValue2:
62  this->processUpdateQos2(sample, info);
63  break;
65  this->processUpdateFilterExpressionParams(sample, info);
66  break;
67  case DestroyEntity:
68  this->processDelete(sample, info);
69  break;
70  default:
72  ACE_TEXT("(%P|%t) ERROR: UpdateProcessor::processSample() - ")
73  ACE_TEXT("upsupported action type: %d.\n"),
74  sample->action));
75  break;
76  }
77 
78  } else {
81  ACE_TEXT("(%P|%t) UpdateProcessor::processSample() - ")
82  ACE_TEXT("sample not valid, declining to process.\n")));
83  }
84  }
85 }
86 
87 template<class DataType>
88 void
90  const DataType* /* sample */,
91  const DDS::SampleInfo* /* info */)
92 {
93  /* This method intentionally left unimplemented. */
94 }
95 
96 template<class DataType>
97 void
99  const DataType* /* sample */,
100  const DDS::SampleInfo* /* info */)
101 {
102  /* This method intentionally left unimplemented. */
103 }
104 
105 } // namespace Federator
106 } // namespace OpenDDS
107 
109 
110 #endif /* UPDATEPROCESSOR_T_CPP */
virtual void processUpdateQos2(const DataType *sample, const DDS::SampleInfo *info)
#define ACE_DEBUG(X)
#define ACE_ERROR(X)
LM_DEBUG
virtual void processUpdateFilterExpressionParams(const DataType *sample, const DDS::SampleInfo *info)
A default null implementation is provided.
void processSample(const DataType *sample, const DDS::SampleInfo *info)
Update publication information with sample data.
ACE_TEXT("TCP_Factory")
OpenDDS_Dcps_Export unsigned int DCPS_debug_level
Definition: debug.cpp:30
#define OPENDDS_END_VERSIONED_NAMESPACE_DECL
LM_ERROR
The Internal API and Implementation of OpenDDS.
Definition: AddressCache.h:28