KDIS  2-8-x
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
RelationshipRecord.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: RelationshipRecord
32  created: 26/06/2008
33  author: Karl Jones
34 
35  purpose: Specifies the relationship of the part entity to its host entity.
36  size: 32 bits / 4 octets
37 *********************************************************************/
38 
39 #pragma once
40 
41 #include "./DataTypeBase.h"
42 
43 namespace KDIS {
44 namespace DATA_TYPE {
45 
47 {
48 protected:
49 
51 
53 
54 public:
55 
56  static const KUINT16 RELATIONSHIP_RECORD_SIZE = 4;
57 
59 
60  RelationshipRecord( KDataStream & stream )throw( KException );
61 
63 
64  virtual ~RelationshipRecord();
65 
66  //************************************
67  // FullName: KDIS::DATA_TYPE::RelationshipRecord::SetNature
68  // KDIS::DATA_TYPE::RelationshipRecord::GetNature
69  //!Description: Nature or purpose for joining of the part entity to the host
70  //! entity within a IsPartOf PDU.
71  // Parameter: RelationshipNature N
72  //************************************
75 
76  //************************************
77  // FullName: KDIS::DATA_TYPE::RelationshipRecord::SetPosition
78  // KDIS::DATA_TYPE::RelationshipRecord::GetPosition
79  //!Description: Specifies the position of the part entity with respect to the host
80  //! entity within a IsPartOf PDU.
81  // Parameter: RelationshipPosition P
82  //************************************
85 
86  //************************************
87  // FullName: KDIS::DATA_TYPE::RelationshipRecord::GetAsString
88  //!Description: Returns a string representation
89  //************************************
90  virtual KString GetAsString() const;
91 
92  //************************************
93  // FullName: KDIS::DATA_TYPE::RelationshipRecord::Decode
94  //!Description: Convert From Network Data.
95  // Parameter: KDataStream & stream
96  //************************************
97  virtual void Decode( KDataStream & stream ) throw( KException );
98 
99  //************************************
100  // FullName: KDIS::DATA_TYPE::RelationshipRecord::Encode
101  //!Description: Convert To Network Data.
102  // Parameter: KDataStream & stream
103  //************************************
104  virtual KDataStream Encode() const;
105  virtual void Encode( KDataStream & stream ) const;
106 
107  KBOOL operator == ( const RelationshipRecord & Value ) const;
108  KBOOL operator != ( const RelationshipRecord & Value ) const;
109 };
110 
111 } // END namespace DATA_TYPES
112 } // END namespace KDIS
RelationshipNature
Definition: EnumEntityManagement.h:618
unsigned short int KUINT16
Definition: KDefines.h:101
KUINT16 m_ui16Pos
Definition: RelationshipRecord.h:52
Definition: KDefines.h:182
Definition: KDataStream.h:48
Definition: DataTypeBase.h:49
bool KBOOL
Definition: KDefines.h:119
std::string KString
Definition: KDefines.h:116
Definition: RelationshipRecord.h:46
KUINT16 m_ui16Nature
Definition: RelationshipRecord.h:50
#define KDIS_EXPORT
Definition: KDefines.h:82
RelationshipPosition
Definition: EnumEntityManagement.h:646