Panda3D
|
00001 // Filename: eggComment.I 00002 // Created by: drose (20Jan99) 00003 // 00004 //////////////////////////////////////////////////////////////////// 00005 // 00006 // PANDA 3D SOFTWARE 00007 // Copyright (c) Carnegie Mellon University. All rights reserved. 00008 // 00009 // All use of this software is subject to the terms of the revised BSD 00010 // license. You should have received a copy of this license along 00011 // with this source code in a file named "LICENSE." 00012 // 00013 //////////////////////////////////////////////////////////////////// 00014 00015 00016 //////////////////////////////////////////////////////////////////// 00017 // Function: EggComment::Constructor 00018 // Access: Public 00019 // Description: 00020 //////////////////////////////////////////////////////////////////// 00021 INLINE EggComment:: 00022 EggComment(const string &node_name, const string &comment) 00023 : EggNode(node_name), _comment(comment) { 00024 } 00025 00026 //////////////////////////////////////////////////////////////////// 00027 // Function: EggComment::Copy Constructor 00028 // Access: Public 00029 // Description: 00030 //////////////////////////////////////////////////////////////////// 00031 INLINE EggComment:: 00032 EggComment(const EggComment ©) : EggNode(copy), _comment(copy._comment) { 00033 } 00034 00035 00036 //////////////////////////////////////////////////////////////////// 00037 // Function: EggComment::Assignment operator 00038 // Access: Public 00039 // Description: 00040 //////////////////////////////////////////////////////////////////// 00041 INLINE EggComment &EggComment:: 00042 operator = (const string &comment) { 00043 _comment = comment; 00044 return *this; 00045 } 00046 00047 00048 //////////////////////////////////////////////////////////////////// 00049 // Function: EggComment::Copy assignment operator 00050 // Access: Public 00051 // Description: 00052 //////////////////////////////////////////////////////////////////// 00053 INLINE EggComment &EggComment:: 00054 operator = (const EggComment ©) { 00055 _comment = copy._comment; 00056 return *this; 00057 } 00058 00059 00060 //////////////////////////////////////////////////////////////////// 00061 // Function: EggComment::String typecast operator 00062 // Access: Public 00063 // Description: 00064 //////////////////////////////////////////////////////////////////// 00065 INLINE EggComment:: 00066 operator const string & () const { 00067 return _comment; 00068 } 00069 00070 00071 //////////////////////////////////////////////////////////////////// 00072 // Function: EggComment::set_comment 00073 // Access: Public 00074 // Description: 00075 //////////////////////////////////////////////////////////////////// 00076 INLINE void EggComment:: 00077 set_comment(const string &comment) { 00078 _comment = comment; 00079 } 00080 00081 00082 //////////////////////////////////////////////////////////////////// 00083 // Function: EggComment::set_comment 00084 // Access: Public 00085 // Description: 00086 //////////////////////////////////////////////////////////////////// 00087 INLINE string EggComment:: 00088 get_comment() const { 00089 return _comment; 00090 } 00091