MGCL V10  V10
MGCL V10
 全て クラス 名前空間 関数 変数 型定義 列挙型 列挙値 フレンド グループ ページ
Name.h
1 /********************************************************************/
2 /* Copyright (c) 2015 DG Technologies Inc. and Yuzi Mizuno */
3 /* All rights reserved. */
4 /********************************************************************/
5 #ifndef _MGNAME_HH_
6 #define _MGNAME_HH_
7 
8 #include <iosfwd>
9 #include <string>
10 #include "mgGL/GLAttrib.h"
11 #include "mgGL/Color.h"
12 
13 class MGOfstream;
14 class MGIfstream;
15 
20 
29 class MG_DLL_DECLR MGName : public MGGLAttrib{
30 
31 public:
32 
33 MGName();
34 MGName(const std::string& name);
35 
37 bool operator ==(const MGName& name2)const{return m_name==name2.m_name;};
38 
40 MGName* clone()const;
41 
42 void setName(std::string& name);
43 void setName(char* name);
44 
45 std::string& getName(){return m_name;};
46 const std::string& getName()const{return m_name;};
47 
49 void exec(mgVBO& vbo)const{;};
50 
53  mgVBO& vbo,
54  bool no_color=false
55 )const{;};
56 
58 void render(mgVBO& vbo)const{;};
59 
61 void set_draw_attrib_mask(unsigned int& mask)const{mask=0;};
62 
64 void reset_draw_attrib_mask(unsigned int& mask)const{;};
65 
67 void set_render_attrib_mask(unsigned int& mask)const{mask=0;};
68 
70 void reset_render_attrib_mask(unsigned int& mask)const{;};
71 
73 long identify_type() const{return MGNAME_TID;};
74 
75 std::string whoami()const{return "Name";};
76 
78 void ReadMembers(MGIfstream& buf);
80 void WriteMembers(MGOfstream& buf)const;
81 
83 std::ostream& out(std::ostream&) const;
84 
85 private:
86 
87  std::string m_name;//Name data will be stored.
88 
89 };
90  // end of GLAttrib group
92 #endif // _MGNAME_HH_
void reset_draw_attrib_mask(unsigned int &mask) const
Turn off the appropriate mask bit for this attribute. See glPushAttrib().
Definition: Name.h:64
MGGLAttrib is an abstract class which defines the enum of undefined or disabled.
Definition: GLAttrib.h:35
void reset_render_attrib_mask(unsigned int &mask) const
Turn off the appropriate mask bit for this attribute. See glPushAttrib().
Definition: Name.h:70
virtual MGGLAttrib * clone() const =0
Generate a newed clone object.
virtual void WriteMembers(MGOfstream &buf) const
Write all member data.
virtual void ReadMembers(MGIfstream &buf)
Read all member data.
MGIfstream is a class to read the serialized data generated by MGOfstream.
Definition: Ifstream.h:30
const std::string & getName() const
Definition: Name.h:46
void set_draw_attrib_mask(unsigned int &mask) const
Turn on the appropriate mask bit for this attribute. See glPushAttrib().
Definition: Name.h:61
Defines MGAttribedGel's Name data.
Definition: Name.h:29
void drawAttrib(mgVBO &vbo, bool no_color=false) const
draw GLAttribute process.
Definition: Name.h:52
virtual std::ostream & out(std::ostream &) const
Output virtual function.
void set_render_attrib_mask(unsigned int &mask) const
Turn on the appropriate mask bit for this attribute. See glPushAttrib().
Definition: Name.h:67
MGOfstream is a class to serialize all of the subclasses of MGGel.
Definition: Ofstream.h:31
std::string & getName()
Definition: Name.h:45
void exec(mgVBO &vbo) const
render GLAttribute process.
Definition: Name.h:49
void render(mgVBO &vbo) const
render GLAttribute process.
Definition: Name.h:58
long identify_type() const
Return This object's typeID.
Definition: Name.h:73
std::string whoami() const
Definition: Name.h:75
virtual bool operator==(const MGGel &gel2) const
Comparison.
Definition: Gel.h:80
OpenGL 4 用描画のためのクラス, in other words, display list.
Definition: VBO.h:76