This file is indexed.

/usr/include/oce/TDF_Attribute.hxx is in liboce-ocaf-lite-dev 0.17.2-2.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
// This file is generated by WOK (CPPExt).
// Please do not edit this file; modify original file instead.
// The copyright and license terms as defined for the original file apply to 
// this header file considered to be the "object code" form of the original source.

#ifndef _TDF_Attribute_HeaderFile
#define _TDF_Attribute_HeaderFile

#include <Standard.hxx>
#include <Standard_DefineHandle.hxx>
#include <Handle_TDF_Attribute.hxx>

#include <TDF_LabelNodePtr.hxx>
#include <Standard_Integer.hxx>
#include <Handle_TDF_Attribute.hxx>
#include <MMgt_TShared.hxx>
#include <Standard_Boolean.hxx>
#include <Handle_TDF_AttributeDelta.hxx>
#include <Handle_TDF_DeltaOnAddition.hxx>
#include <Handle_TDF_DeltaOnForget.hxx>
#include <Handle_TDF_DeltaOnResume.hxx>
#include <Handle_TDF_DeltaOnModification.hxx>
#include <Handle_TDF_DeltaOnRemoval.hxx>
#include <Handle_TDF_RelocationTable.hxx>
#include <Handle_TDF_DataSet.hxx>
#include <Standard_OStream.hxx>
class Standard_DomainError;
class TDF_Data;
class TDF_Label;
class TDF_LabelNode;
class TDF_AttributeIterator;
class TDF_DeltaOnForget;
class Standard_GUID;
class TDF_AttributeDelta;
class TDF_DeltaOnAddition;
class TDF_DeltaOnResume;
class TDF_DeltaOnModification;
class TDF_DeltaOnRemoval;
class TDF_RelocationTable;
class TDF_DataSet;
class TDF_IDFilter;
class TDF_AttributeIndexedMap;


//! A class each application has to implement. It is
//! used to contain the application data.
//! This abstract class, alongwith Label,
//! is one of the cornerstones of Model Editor.
//! The groundwork is to define the root of
//! information. This information is to be
//! attached to a Label, and could be of any of
//! the following types:
//! -   a feature
//! -   a constraint
//! -   a comment
//!
//! Contents:
//! ---------
//!
//! Each software component who'd like to attach its
//! own information to a label has to inherit from
//! this class and has to add its own information as
//! fields of this new class.
//!
//! Identification:
//! ---------------
//!
//! An attribute can be identified by its ID. Every
//! attributes used with the same meaning (for
//! exemple: Integer, String, Topology...) have the
//! same worldwide unique ID.
//!
//! Addition:
//! ---------
//!
//! An attribute can be added to a label only if there
//! is no attribute yet with the same ID. Call-back
//! methods are offered, called automatically before
//! and after the addition action.
//!
//! Removal:
//! --------
//!
//! An attribute can be removed from a label only if
//! there is an attribute yet with the same
//! ID. Call-back methods are offered, called
//! automatically before and after the removal
//! action. A removed attribute cannot be found
//! again. After a removal, only an addition of an
//! attribute with the sane ID is possible (no
//! backup...).
//!
//! Modification & Transaction:
//! ---------------------------
//!
//! An attribute can be backuped before a
//! modification. Only one backup attribute by
//! transaction is possible. The modification can be
//! forgotten (abort transaction) or validated (commit
//! transaction).
//!
//! BackupCopy and restore are methods used by the backup or
//! abort transaction actions. BackupCopy is called by
//! Backup to generate an attribute with the same
//! contents as the current one. Restore is called
//! when aborting a transaction to transfer the
//! backuped contents into the current
//! attribute. These methods must be implemented by
//! end use inheriting classes.
//!
//! A standard implementation of BackupCopy is provided, but
//! it is not necessary a good one for any use.
//!
//! Copy use methods:
//! -----------------
//!
//! Paste and NewEmpty methods are used by the copy
//! algorithms. The goal of "Paste" is to transfer an
//! attribute new contents into another attribute. The
//! goal of "NewEmpty" is to create an attribute
//! whithout contents, to be further filled with the
//! new contents of another one. These 2 methods must
//! be implemented by end use inheriting classes.
//!
//! AttributeDelta:
//! ---------------
//!
//! An AttributeDelta is the difference between to
//! attribute values states.  These methods must be
//! implemented by end use inheriting classes, to
//! profit from the delta services.
class TDF_Attribute : public MMgt_TShared
{

public:

  
  //! Returns the ID of the attribute.
  Standard_EXPORT virtual  const  Standard_GUID& ID()  const = 0;
  
  //! Returns   the   label to which  the   attribute is
  //! attached. If the  label is not  included in a  DF,
  //! the label is null. See Label.
  //! Warning
  //! If the label is not included in a data
  //! framework, it is null.
  //! This function should not be redefined inline.
  Standard_EXPORT  const  TDF_Label Label()  const;
  
  //! Returns the transaction index in which the
  //! attribute has been created or modified.
      Standard_Integer Transaction()  const;
  
  //! Returns the upper transaction index until which
  //! the attribute is/was valid. This number may
  //! vary. A removed attribute validity range is
  //! reduced to its transaction index.
  Standard_EXPORT   Standard_Integer UntilTransaction()  const;
  
  //! Returns true if the attribute is valid; i.e. not a
  //! backuped or removed one.
      Standard_Boolean IsValid()  const;
  
  //! Returns true if the attribute has no backup
      Standard_Boolean IsNew()  const;
  
  //! Returns true if the attribute forgotten status is
  //! set.
  //!
  //! ShortCut Methods concerning associated attributes
  //! =================================================
      Standard_Boolean IsForgotten()  const;
  
  //! Returns true if it  exists an associated attribute
  //! of <me> with <anID> as ID.
  Standard_EXPORT   Standard_Boolean IsAttribute (const Standard_GUID& anID)  const;
  
  //! Finds an associated  attribute of  <me>, according
  //! to <anID>.  the returned <anAttribute> is a  valid
  //! one. The  method  returns  True if   found,  False
  //! otherwise.   A removed attribute  cannot be found using
  //! this  method.
  Standard_EXPORT   Standard_Boolean FindAttribute (const Standard_GUID& anID, Handle(TDF_Attribute)& anAttribute)  const;
  
  //! Adds   an   Attribute <other>  to  the   label  of
  //! <me>.Raises if there is  already  one of the same
  //! GUID fhan <other>.
  Standard_EXPORT   void AddAttribute (const Handle(TDF_Attribute)& other)  const;
  
  //! Forgets  the Attribute of  GUID <aguid> associated
  //! to the label of <me>. Be  carefull that if <me> is
  //! the attribute of <guid>, <me> will have a null label
  //! after this call.  If  the attribute doesn't  exist
  //! returns False. Otherwise returns True.
  Standard_EXPORT   Standard_Boolean ForgetAttribute (const Standard_GUID& aguid)  const;
  
  //! Forgets all the  attributes attached to  the label
  //! of <me>.    Does   it   on  the  sub-labels   if
  //! <clearChildren> is set  to true.  Of  course, this
  //! method  is  compatible with Transaction  &  Delta
  //! mecanisms. Be carefull  that  if <me> will have a
  //! null label after this call
  Standard_EXPORT   void ForgetAllAttributes (const Standard_Boolean clearChildren = Standard_True)  const;
  
  //! Something to do after adding an Attribute to a label.
  Standard_EXPORT virtual   void AfterAddition() ;
  
  //! Something to do before removing an Attribute from
  //! a label.
  Standard_EXPORT virtual   void BeforeRemoval() ;
  
  //! Something to do before forgetting an Attribute to a
  //! label.
  Standard_EXPORT virtual   void BeforeForget() ;
  
  //! Something to do after resuming an Attribute from
  //! a label.
  Standard_EXPORT virtual   void AfterResume() ;
  
  //! Something to do AFTER creation of an attribute by
  //! persistent-transient translation. The returned
  //! status says if AfterUndo has been performed (true)
  //! or if this callback must be called once again
  //! further (false). If <forceIt> is set to true, the
  //! method MUST perform and return true. Does nothing
  //! by default and returns true.
  Standard_EXPORT virtual   Standard_Boolean AfterRetrieval (const Standard_Boolean forceIt = Standard_False) ;
  
  //! Something to do before applying <anAttDelta>. The
  //! returned status says if AfterUndo has been
  //! performed (true) or if this callback must be
  //! called once again further (false). If <forceIt> is
  //! set to true, the method MUST perform and return
  //! true. Does nothing by default and returns true.
  Standard_EXPORT virtual   Standard_Boolean BeforeUndo (const Handle(TDF_AttributeDelta)& anAttDelta, const Standard_Boolean forceIt = Standard_False) ;
  
  //! Something to do after applying <anAttDelta>. The
  //! returned status says if AfterUndo has been
  //! performed (true) or if this callback must be
  //! called once again further (false). If <forceIt> is
  //! set to true, the method MUST perform and return
  //! true. Does nothing by default and returns true.
  Standard_EXPORT virtual   Standard_Boolean AfterUndo (const Handle(TDF_AttributeDelta)& anAttDelta, const Standard_Boolean forceIt = Standard_False) ;
  
  //! A callback.
  //! By default does nothing.
  //! It is called by TDF_Data::CommitTransaction() method.
  Standard_EXPORT virtual   void BeforeCommitTransaction() ;
  
  //! Backups the attribute. The backuped attribute is
  //! flagged "Backuped" and not "Valid".
  //!
  //! The method does nothing:
  //!
  //! 1) If the attribute transaction number is equal to
  //! the current transaction number (the attribute has
  //! already been backuped).
  //!
  //! 2) If the attribute is not attached to a label.
  Standard_EXPORT   void Backup() ;
  
  //! Returns true if the attribute backup status is
  //! set. This status is set/unset by the
  //! Backup() method.
      Standard_Boolean IsBackuped()  const;
  
  //! Copies  the attribute  contents into  a  new other
  //! attribute. It is used by Backup().
  Standard_EXPORT virtual   Handle(TDF_Attribute) BackupCopy()  const;
  
  //! Restores the backuped contents from <anAttribute>
  //! into this one. It is used when aborting a
  //! transaction.
  Standard_EXPORT virtual   void Restore (const Handle(TDF_Attribute)& anAttribute)  = 0;
  
  //! Makes an AttributeDelta because <me>
  //! appeared. The only known use of a redefinition of
  //! this method is to return a null handle (no delta).
  Standard_EXPORT virtual   Handle(TDF_DeltaOnAddition) DeltaOnAddition()  const;
  
  //! Makes an AttributeDelta because <me> has been
  //! forgotten.
  Standard_EXPORT virtual   Handle(TDF_DeltaOnForget) DeltaOnForget()  const;
  
  //! Makes an AttributeDelta because <me> has been
  //! resumed.
  Standard_EXPORT virtual   Handle(TDF_DeltaOnResume) DeltaOnResume()  const;
  
  //! Makes a DeltaOnModification between <me> and
  //! <anOldAttribute.
  Standard_EXPORT virtual   Handle(TDF_DeltaOnModification) DeltaOnModification (const Handle(TDF_Attribute)& anOldAttribute)  const;
  
  //! Applies a DeltaOnModification to <me>.
  Standard_EXPORT virtual   void DeltaOnModification (const Handle(TDF_DeltaOnModification)& aDelta) ;
  
  //! Makes a DeltaOnRemoval on <me> because <me> has
  //! disappeared from the DS.
  Standard_EXPORT virtual   Handle(TDF_DeltaOnRemoval) DeltaOnRemoval()  const;
  
  //! Returns an new empty attribute from the good end
  //! type. It is used by the copy algorithm.
  Standard_EXPORT virtual   Handle(TDF_Attribute) NewEmpty()  const = 0;
  
  //! This method is different from the "Copy" one,
  //! because it is used when copying an attribute from
  //! a source structure into a target structure. This
  //! method may paste the contents of <me> into
  //! <intoAttribute>.
  //!
  //! The given pasted attribute can be full or empty of
  //! its contents. But don't make a NEW! Just set the
  //! contents!
  //!
  //! It is possible to use <aRelocationTable> to
  //! get/set the relocation value of a source
  //! attribute.
  Standard_EXPORT virtual   void Paste (const Handle(TDF_Attribute)& intoAttribute, const Handle(TDF_RelocationTable)& aRelocationTable)  const = 0;
  
  //! Adds the first level referenced attributes and labels
  //! to <aDataSet>.
  //!
  //! For this, use the AddLabel or AddAttribute of
  //! DataSet.
  //!
  //! If there is none, do not implement the method.
  Standard_EXPORT virtual   void References (const Handle(TDF_DataSet)& aDataSet)  const;
  
  //! Dumps the minimum information about <me> on
  //! <aStream>.
  Standard_EXPORT virtual   Standard_OStream& Dump (Standard_OStream& anOS)  const;
  Standard_OStream& operator<< (Standard_OStream& anOS)  const
{
  return Dump(anOS);
}
  
  //! Dumps the attribute content on <aStream>, using
  //! <aMap> like this: if an attribute is not in the
  //! map, first put add it to the map and then dump it.
  //! Use the map rank instead of dumping each attribute
  //! field.
  Standard_EXPORT virtual   void ExtendedDump (Standard_OStream& anOS, const TDF_IDFilter& aFilter, TDF_AttributeIndexedMap& aMap)  const;
  
  //! Forgets the attribute. <aTransaction> is the
  //! current transaction in which the forget is done. A
  //! forgotten attribute is also flagged not "Valid".
  //!
  //! A forgotten attribute is invisible. Set also the
  //! "Valid" status to False. Obvioulsy, DF cannot
  //! empty an attribute (this has a semantic
  //! signification), but can remove it from the
  //! structure. So, a forgotten attribute is NOT an empty
  //! one, but a soon DEAD one.
  //!
  //! Should be private.
  Standard_EXPORT   void Forget (const Standard_Integer aTransaction) ;


friend class TDF_Data;
friend class TDF_Label;
friend class TDF_LabelNode;
friend class TDF_AttributeIterator;
friend class TDF_DeltaOnForget;


  DEFINE_STANDARD_RTTI(TDF_Attribute)

protected:

  
  //! Initializes fields.
  Standard_EXPORT TDF_Attribute();



private: 

  
  //! Set the "Valid" status with <aStatus>.
      void Validate (const Standard_Boolean aStatus) ;
  
  //! Resumes the attribute (undos Forget action).
  Standard_EXPORT   void Resume() ;
  
  //! Set the "backuped" status with <aStatus>.
      void Backup (const Standard_Boolean aStatus) ;
  
  //! Removes the last backup attribute, if it exists.
  Standard_EXPORT   void RemoveBackup() ;

  TDF_LabelNodePtr myLabelNode;
  Standard_Integer myTransaction;
  Standard_Integer mySavedTransaction;
  Standard_Integer myFlags;
  Handle(TDF_Attribute) myNext;
  Handle(TDF_Attribute) myBackup;


};


#include <TDF_Attribute.lxx>





#endif // _TDF_Attribute_HeaderFile