Panda3D
eggComment.I
1 // Filename: eggComment.I
2 // Created by: drose (20Jan99)
3 //
4 ////////////////////////////////////////////////////////////////////
5 //
6 // PANDA 3D SOFTWARE
7 // Copyright (c) Carnegie Mellon University. All rights reserved.
8 //
9 // All use of this software is subject to the terms of the revised BSD
10 // license. You should have received a copy of this license along
11 // with this source code in a file named "LICENSE."
12 //
13 ////////////////////////////////////////////////////////////////////
14 
15 
16 ////////////////////////////////////////////////////////////////////
17 // Function: EggComment::Constructor
18 // Access: Public
19 // Description:
20 ////////////////////////////////////////////////////////////////////
21 INLINE EggComment::
22 EggComment(const string &node_name, const string &comment)
23  : EggNode(node_name), _comment(comment) {
24 }
25 
26 ////////////////////////////////////////////////////////////////////
27 // Function: EggComment::Copy Constructor
28 // Access: Public
29 // Description:
30 ////////////////////////////////////////////////////////////////////
31 INLINE EggComment::
32 EggComment(const EggComment &copy) : EggNode(copy), _comment(copy._comment) {
33 }
34 
35 
36 ////////////////////////////////////////////////////////////////////
37 // Function: EggComment::Assignment operator
38 // Access: Public
39 // Description:
40 ////////////////////////////////////////////////////////////////////
41 INLINE EggComment &EggComment::
42 operator = (const string &comment) {
43  _comment = comment;
44  return *this;
45 }
46 
47 
48 ////////////////////////////////////////////////////////////////////
49 // Function: EggComment::Copy assignment operator
50 // Access: Public
51 // Description:
52 ////////////////////////////////////////////////////////////////////
53 INLINE EggComment &EggComment::
54 operator = (const EggComment &copy) {
55  _comment = copy._comment;
56  return *this;
57 }
58 
59 
60 ////////////////////////////////////////////////////////////////////
61 // Function: EggComment::String typecast operator
62 // Access: Public
63 // Description:
64 ////////////////////////////////////////////////////////////////////
65 INLINE EggComment::
66 operator const string & () const {
67  return _comment;
68 }
69 
70 
71 ////////////////////////////////////////////////////////////////////
72 // Function: EggComment::set_comment
73 // Access: Public
74 // Description:
75 ////////////////////////////////////////////////////////////////////
76 INLINE void EggComment::
77 set_comment(const string &comment) {
78  _comment = comment;
79 }
80 
81 
82 ////////////////////////////////////////////////////////////////////
83 // Function: EggComment::set_comment
84 // Access: Public
85 // Description:
86 ////////////////////////////////////////////////////////////////////
87 INLINE string EggComment::
88 get_comment() const {
89  return _comment;
90 }
91 
A comment that appears in an egg file within a <Comment> entry.
Definition: eggComment.h:27
A base class for things that may be directly added into the egg hierarchy.
Definition: eggNode.h:38