KDIS  2-8-x
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
SilentAggregateSystem.h
Go to the documentation of this file.
1 /*********************************************************************
2 Copyright 2013 Karl Jones
3 All rights reserved.
4 
5 Redistribution and use in source and binary forms, with or without
6 modification, are permitted provided that the following conditions are met:
7 
8 1. Redistributions of source code must retain the above copyright notice, this
9  list of conditions and the following disclaimer.
10 2. Redistributions in binary form must reproduce the above copyright notice,
11  this list of conditions and the following disclaimer in the documentation
12  and/or other materials provided with the distribution.
13 
14 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
15 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
16 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
17 DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
18 ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
19 (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
20 LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
21 ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
23 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24 
25 For Further Information Please Contact me at
26 Karljj1@yahoo.com
27 http://p.sf.net/kdis/UserGuide
28 *********************************************************************/
29 
30 /********************************************************************
31  class: SilentAggregateSystem
32  created: 2009/02/08
33  author: Karl Jones
34 
35  purpose: Contains information about subaggregates not producing
36  Aggregate State PDUs.
37  size: 96 bits / 12 octets
38 *********************************************************************/
39 
40 #pragma once
41 
42 #include "./DataTypeBase.h"
43 #include "./AggregateType.h"
44 #include <vector>
45 
46 namespace KDIS {
47 namespace DATA_TYPE {
48 
50 {
51 protected:
52 
54 
56 
57 public:
58 
59  static const KUINT16 SILENT_AGGREGATE_SYSTEM_SIZE = 12;
60 
62 
63  SilentAggregateSystem( KDataStream & stream ) throw( KException );
64 
65  SilentAggregateSystem( KUINT16 NumAggregates, const AggregateType & T );
66 
67  virtual ~SilentAggregateSystem();
68 
69  //************************************
70  // FullName: KDIS::DATA_TYPE::SilentAggregateSystem::SetNumberOfAggregates
71  // KDIS::DATA_TYPE::SilentAggregateSystem::GetNumberOfAggregates
72  //!Description: Number of aggregates of this type.
73  // Parameter: KUINT16 NOA
74  //************************************
75  void SetNumberOfAggregates( KUINT16 NOA );
76  KUINT16 GetNumberOfAggregates() const;
77 
78  //************************************
79  // FullName: KDIS::DATA_TYPE::SilentAggregateSystem::SetAggregateType
80  // KDIS::DATA_TYPE::SilentAggregateSystem::GetAggregateType
81  //!Description: Aggregate type for this record.
82  // Parameter: const AggregateType & A, void
83  //************************************
84  void SetAggregateType( const AggregateType & A );
85  const AggregateType & GetAggregateType() const;
86  AggregateType & GetAggregateType();
87 
88  //************************************
89  // FullName: KDIS::DATA_TYPE::SilentAggregateSystem::GetAsString
90  //!Description: Returns a string representation
91  //************************************
92  virtual KString GetAsString() const;
93 
94  //************************************
95  // FullName: KDIS::DATA_TYPE::SilentAggregateSystem::Decode
96  //!Description: Convert From Network Data.
97  // Parameter: KDataStream & stream
98  //************************************
99  virtual void Decode( KDataStream & stream ) throw( KException );
100 
101  //************************************
102  // FullName: KDIS::DATA_TYPE::SilentAggregateSystem::Encode
103  //!Description: Convert To Network Data.
104  // Parameter: KDataStream & stream
105  //************************************
106  virtual KDataStream Encode() const;
107  virtual void Encode( KDataStream & stream ) const;
108 
109  KBOOL operator == ( const SilentAggregateSystem & Value ) const;
110  KBOOL operator != ( const SilentAggregateSystem & Value ) const;
111 };
112 
113 } // END namespace DATA_TYPES
114 } // END namespace KDIS
115 
unsigned short int KUINT16
Definition: KDefines.h:101
Definition: SilentAggregateSystem.h:49
Definition: KDefines.h:182
KUINT16 m_ui16NumAggregates
Definition: SilentAggregateSystem.h:53
Definition: KDataStream.h:48
Definition: DataTypeBase.h:49
bool KBOOL
Definition: KDefines.h:119
std::string KString
Definition: KDefines.h:116
#define KDIS_EXPORT
Definition: KDefines.h:82
AggregateType m_AggTyp
Definition: SilentAggregateSystem.h:55
Definition: AggregateType.h:46