libsurf
Programmer's Documentation

iges308.h (r6227/r5385)
1 
2 /* Copyright (C) 2015 David Eller <david@larosterna.com>
3  *
4  * Commercial License Usage
5  * Licensees holding valid commercial licenses may use this file in accordance
6  * with the terms contained in their respective non-exclusive license agreement.
7  * For further information contact david@larosterna.com .
8  *
9  * GNU General Public License Usage
10  * Alternatively, this file may be used under the terms of the GNU General
11  * Public License version 3.0 as published by the Free Software Foundation and
12  * appearing in the file gpl.txt included in the packaging of this file.
13  */
14 
15 #ifndef SURF_IGESSUBFIGURE_H
16 #define SURF_IGESSUBFIGURE_H
17 
18 #include <genua/defines.h>
19 #include "igesentity.h"
20 
30 class IgesSubfigure : public IgesEntity
31 {
32  public:
33 
35  IgesSubfigure() : IgesEntity(308), depth(0) {}
36 
38  const std::string & name() const {return id;}
39 
41  void rename(const std::string & s) {id = s;}
42 
44  void nestingDepth(uint d) {depth = d;}
45 
47  uint size() const {return deps.size();}
48 
50  uint operator[] (uint k) const {
51  assert(k < deps.size());
52  return deps[k];
53  }
54 
56  const Indices & subEntities() const {return deps;}
57 
59  void copy(const Indices & idx) {deps = idx;}
60 
62  void appendEntity(uint k) {deps.push_back(k);}
63 
65  void definition(IgesFile & file);
66 
68  uint parse(const std::string & pds, const Indices & vpos);
69 
70  private:
71 
73  std::string id;
74 
76  uint depth;
77 
79  Indices deps;
80 };
81 
82 #endif // IGESSUBFIGURE_H
const Indices & subEntities() const
access dependencies
Definition: iges308.h:56
Base class for entities in IGES files.
Definition: igesentity.h:32
uint size() const
number of DEs referenced
Definition: iges308.h:47
uint parse(const std::string &pds, const Indices &vpos)
parse entity data
Definition: iges308.cpp:34
void nestingDepth(uint d)
assign nesting depth
Definition: iges308.h:44
Main interface to IGES files.
Definition: igesfile.h:32
std::string id
subfigure name
Definition: iges308.h:73
void copy(const Indices &idx)
copy entities
Definition: iges308.h:59
uint operator[](uint k) const
access DE index k
Definition: iges308.h:50
IgesSubfigure()
create empty subfigure
Definition: iges308.h:35
Indices deps
directory entries of sub-entities
Definition: iges308.h:79
const std::string & name() const
subfigure name
Definition: iges308.h:38
void rename(const std::string &s)
rename subfigure
Definition: iges308.h:41
uint depth
nesting depth
Definition: iges308.h:76
IGES 308 : Subfigure.
Definition: iges308.h:30
void appendEntity(uint k)
append single entity
Definition: iges308.h:62
void definition(IgesFile &file)
assemble definition
Definition: iges308.cpp:21
Generated on Wed Jan 19 2022 03:03:15 for libsurf by   doxygen 1.8.5