-
Notifications
You must be signed in to change notification settings - Fork 11
/
IsoComponent.h
88 lines (65 loc) · 2.07 KB
/
IsoComponent.h
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
/**
* IsoAlgo - piping Isometric drawing generation Algorithm.
* Copyright (C) 2013 to current year Shing Liu
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
* Homepage:
* http://www.cppblog.com/eryar/
*
* Feedback:
*/
#ifndef _ISOCOMPONENT_H_
#define _ISOCOMPONENT_H_
#include "IsoAlgoAbs.h"
#include "IsoEndPoint.h"
namespace IsoAlgo
{
/**
* @brief piping component data.
*/
class IsoComponent
{
public:
//! default contructor.
IsoComponent(const std::string& theType = "");
//! default destrcutor.
~IsoComponent(void);
void AddAttribute(const std::string& theKey, const std::string& theValue);
const std::string& GetType(void) const;
const std::string& GetSkey(void) const;
const IsoEndPoint& GetArrivePoint(void) const;
const IsoEndPoint& GetLeavePoint(void) const;
const IsoEndPoint& GetCentrePoint(void) const;
const IsoEndPoint& GetBranchPoint1(void) const;
const IsoEndPoint& GetBranchPoint2(void) const;
protected:
void buildDirection(const std::string& theExpression);
private:
//! component type.
std::string myType;
//! symbol key.
std::string mySkey;
//! end point count.
int myEndPointCount;
//! component arrive point.
IsoEndPoint myArrivePoint;
//! component leave point.
IsoEndPoint myLeavePoint;
//! component centre point.
IsoEndPoint myCentrePoint;
//! component branch point1, such as tee. etc.
IsoEndPoint myBranchPoint1;
//! component branch point2, such as cross. etc.
IsoEndPoint myBranchPoint2;
//! flat direction, valve handle direction. etc.
gp_Dir myDirection;
//! component attributes.
std::map<std::string, std::string> myAttributes;
};
}
#endif // _ISOCOMPONENT_H_