Open Inventor Release 2024.2.1
 
Loading...
Searching...
No Matches
PbBase.h
1/*=======================================================================
2 *** THE CONTENT OF THIS WORK IS PROPRIETARY TO FEI S.A.S, (FEI S.A.S.), ***
3 *** AND IS DISTRIBUTED UNDER A LICENSE AGREEMENT. ***
4 *** ***
5 *** REPRODUCTION, DISCLOSURE, OR USE, IN WHOLE OR IN PART, OTHER THAN AS ***
6 *** SPECIFIED IN THE LICENSE ARE NOT TO BE UNDERTAKEN EXCEPT WITH PRIOR ***
7 *** WRITTEN AUTHORIZATION OF FEI S.A.S. ***
8 *** ***
9 *** RESTRICTED RIGHTS LEGEND ***
10 *** USE, DUPLICATION, OR DISCLOSURE BY THE GOVERNMENT OF THE CONTENT OF THIS ***
11 *** WORK OR RELATED DOCUMENTATION IS SUBJECT TO RESTRICTIONS AS SET FORTH IN ***
12 *** SUBPARAGRAPH (C)(1) OF THE COMMERCIAL COMPUTER SOFTWARE RESTRICTED RIGHT ***
13 *** CLAUSE AT FAR 52.227-19 OR SUBPARAGRAPH (C)(1)(II) OF THE RIGHTS IN ***
14 *** TECHNICAL DATA AND COMPUTER SOFTWARE CLAUSE AT DFARS 52.227-7013. ***
15 *** ***
16 *** COPYRIGHT (C) 1996-2014 BY FEI S.A.S, ***
17 *** BORDEAUX, FRANCE ***
18 *** ALL RIGHTS RESERVED ***
19**=======================================================================*/
20/*=======================================================================
21** Author : VSG (MMM YYYY)
22**=======================================================================*/
23
24#ifndef _PB_BASE_
25#define _PB_BASE_
26
27#include <Inventor/SbBasic.h>
28#include <MeshViz/PbBasic.h>
29
30class PoBase;
31
49class PbBase {
50
51 public:
52
59 { m_connectionEnabled = flag; }
60
65 { return m_connectionEnabled; }
66
71 void touch();
72
76 PbBase &operator=(const PbBase &base);
77
78 /*--------------------------------------------------------------------------*/
79 private:
80 // Add or remove a PoBase object to the list of connected objects
81 void addConnection(const PoBase *baseObj);
82 SbBool removeConnection(const PoBase *baseObj);
83
84 // Change type for a PbBase Object
85 enum ChangeType {
86 TGS_TOUCH_TYPE,
87 TGS_DELETE_TYPE,
88 TGS_GEOMETRY_TYPE,
89 TGS_SET_OF_VALUES_TYPE,
90 TGS_SET_OF_STRINGS_TYPE,
91 TGS_SET_OF_VECTORS_TYPE,
92 TGS_DOMAIN_TRANSFORM_TYPE
93 };
94
95 // Get changement type
96 ChangeType getChangeType() const { return m_changeType; }
97 void getDataChange(int &data) const { data = m_intDataChange; }
98
99 private:
100 // Constructors & destructors
101 PbBase();
102 PbBase(const PbBase &base);
103 virtual ~PbBase();
104
105 // Empty the list of connected objects
106 void removeAllConnection();
107
108 // Set changement type and data for a PbBase Object
109 void setChangeType(ChangeType type) { m_changeType = type; }
110 void setDataChange(int data) { m_intDataChange = data; }
111
112 // Notify a change to all connected objects
113 void notifyChange();
114
115 private:
116 struct Element {
117 PoBase *baseObj;
118 Element *next;
119 };
120
121 // Used by constructor per copy and affectation operator
122 void copy(const PbBase &base, SbBool isConstructorPerCopy);
123
124 // Header of the list of PoBase object
125 Element *m_headBaseObjList;
126
127 // Indicate if the connection is enabled or not
128 SbBool m_connectionEnabled;
129
130 // Type of change
131 ChangeType m_changeType;
132
133 // Integer data change
134 int m_intDataChange;
135};
136/*---------------------------------------------------------------------------*/
137
138#endif /* _PB_BASE_ */
139
<a href="IconLegend.html"><img src="extMV.gif" alt="MeshViz" border="0"></a> Abstract class for all b...
Definition PbBase.h:49
void enableConnection(SbBool flag)
Activates/deactivates the mechanism of connection.
Definition PbBase.h:58
PbBase & operator=(const PbBase &base)
Assignment operator.
SbBool isConnectionEnabled() const
Returns TRUE if the connection mechanism is active, otherwise FALSE.
Definition PbBase.h:64
void touch()
Simulates the changing of an instance of this object, so all connected objects are informed of this c...
<a href="IconLegend.html"><img src="extMV.gif" alt="MeshViz" border="0"></a> Abstract base class for ...
Definition PoBase.h:74
int SbBool
Boolean type.
Definition SbBase.h:87