MGCL V10  V10
MGCL V10
 全て クラス 名前空間 関数 変数 型定義 列挙型 列挙値 フレンド グループ ページ
Attrib.h
1 /********************************************************************/
2 /* Copyright (c) 2015 DG Technologies Inc. and Yuzi Mizuno */
3 /* All rights reserved. */
4 /********************************************************************/
5 #ifndef _MGAttrib_HH_
6 #define _MGAttrib_HH_
7 
8 #include "mg/Pvector.h"
9 #include "mg/Gel.h"
10 #include "mg/types.h"
11 
12 //
13 //Define MGAttrib Class.
14 
15 class MGIfstream;
16 class MGOfstream;
17 class MGAttrib;
18 class MGGLAttrib;
19 class MGContext;
20 
25 
28 class MG_DLL_DECLR MGAttrib: public MGGel{
29 
30 public:
31 
33 virtual ~MGAttrib();
34 
37 virtual MGAttrib& operator=(const MGAttrib& gel2){MGGel::operator=(gel2); return *this;};
38 
40 
42 virtual std::ostream& out(std::ostream&) const=0;
43 
45 MGAttrib* attrib(){return this;};
46 const MGAttrib* attrib()const{return this;};
47 
50 virtual long identify_type() const{return MGATTRIB_TID;};
51 
53 const MGObject* includes_object()const{return 0;};
54 
56 MGObject* includes_object(){return 0;};
57 
58 protected:
59 
61 virtual void ReadMembers(MGIfstream& buf);
62 
64 virtual void WriteMembers(MGOfstream& buf)const;
65 
66 private:
67 
68 friend class MGIfstream;
69 friend class MGOfstream;
70 
71 };
72 
74 
76 MG_DLL_DECLR MGAttrib* MGNullAttrib(long TID);
77  // end of GelRelated group
79 #endif
MGObject * includes_object()
Test if this gel includes an object.
Definition: Attrib.h:56
virtual MGGel & operator=(const MGGel &gel2)
Definition: Gel.h:77
virtual MGAttrib & operator=(const MGAttrib &gel2)
Definition: Attrib.h:37
MGGLAttrib is an abstract class which defines the enum of undefined or disabled.
Definition: GLAttrib.h:35
virtual void WriteMembers(MGOfstream &buf) const
Write all member data.
const MGAttrib * attrib() const
Definition: Attrib.h:46
MGIfstream is a class to read the serialized data generated by MGOfstream.
Definition: Ifstream.h:30
virtual long identify_type() const
Definition: Attrib.h:50
Is an abstract class which represents a whole geometry and a topology.
Definition: Object.h:42
MGContext defines the attributes of a document.
Definition: Context.h:33
MGGel is an abstract class which represents a group element.
Definition: Gel.h:53
MGAttrib * attrib()
Return MGAttrib pointer if this MGGel is an MGAttrib, else return null.
Definition: Attrib.h:45
virtual std::ostream & out(std::ostream &) const =0
Output virtual function.
MGOfstream is a class to serialize all of the subclasses of MGGel.
Definition: Ofstream.h:31
const MGObject * includes_object() const
Test if this gel includes an object.
Definition: Attrib.h:53
virtual void ReadMembers(MGIfstream &buf)
Read all member data.
Defines Vector of newed object pointers.
Definition: Pvector.h:27
MGAttrib is an abstract class that defines attribute elements of MGGel.
Definition: Attrib.h:28