MGCL V10  V10
MGCL V10
 全て クラス 名前空間 関数 変数 型定義 列挙型 列挙値 フレンド グループ ページ
Knot.h
1 /********************************************************************/
2 /* Copyright (c) 2015 DG Technologies Inc. and Yuzi Mizuno */
3 /* All rights reserved. */
4 /********************************************************************/
5 #ifndef _MGKnot_HH_
6 #define _MGKnot_HH_
7 
11 #include "mg/MGCL.h"
12 
13 // MGKnot.h
14 //
15 
16 class MGIfstream;
17 class MGOfstream;
18 
20 class MG_DLL_DECLR MGKnot{
21 
22 public:
23 
25 MG_DLL_DECLR friend std::ostream& operator<< (std::ostream&, const MGKnot& );
26 
28 MGKnot():m_multiplicity(0){;};
29 
31 MGKnot(
32  double t,
33  int multiplicity
34 );
35 
36 //Destructor
37 // ~MGKnot();
38 
40 
41 bool operator< (const MGKnot& kt2)const{return m_value<kt2.m_value;};
42 bool operator> (const MGKnot& kt2)const{return kt2<(*this);};
43 bool operator<= (const MGKnot& kt2)const{return !(kt2<(*this));};
44 bool operator>= (const MGKnot& kt2)const{return !((*this)<kt2);};
45 bool operator== (const MGKnot& kt2)const;
46 bool operator!= (const MGKnot& kt2)const{return !operator==(kt2);};
47 
49 
50 double value() const {return m_value;}
51 int multiplicity() const {return m_multiplicity;}
52 
55 int dump_size() const;
56 
58 int dump(MGOfstream& ) const;
59 
61 int restore(MGIfstream& );
62 
64 
65 private:
66  double m_value;
67  int m_multiplicity;
68 
69 };
70  // end of BASE group
72 #endif
MGKnot()
Definition: Knot.h:28
MGIfstream is a class to read the serialized data generated by MGOfstream.
Definition: Ifstream.h:30
std::ostream & operator<<(std::ostream &ostrm, const MGisect &is)
Debug Function.
Definition: isect.h:95
int multiplicity() const
Definition: Knot.h:51
double value() const
Definition: Knot.h:50
MGOfstream is a class to serialize all of the subclasses of MGGel.
Definition: Ofstream.h:31
Defines knot value and its multiplicity.
Definition: Knot.h:20