1 // Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
2 // Copyright (C) 2010 Winch Gate Property Limited
4 // This program is free software: you can redistribute it and/or modify
5 // it under the terms of the GNU Affero General Public License as
6 // published by the Free Software Foundation, either version 3 of the
7 // License, or (at your option) any later version.
9 // This program is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // GNU Affero General Public License for more details.
14 // You should have received a copy of the GNU Affero General Public License
15 // along with this program. If not, see <http://www.gnu.org/licenses/>.
17 #include "stdgeorgesconvert.h"
20 #include "form_body_elt.h"
22 namespace NLOLDGEORGES
25 //////////////////////////////////////////////////////////////////////
26 // Construction/Destruction
27 //////////////////////////////////////////////////////////////////////
31 body
.SetName( "BODY" );
35 CForm::CForm( const CForm
& _f
)
37 bmodified
= _f
.bmodified
;
46 void CForm::serial( NLMISC::IStream
& s
)
52 CStringEx
CForm::GetDate() const
54 return( head
.GetDate() );
57 CStringEx
CForm::GetVersion() const
59 return( head
.GetVersion() );
62 CStringEx
CForm::GetUser() const
64 return( head
.GetUser() );
67 CStringEx
CForm::GetComment() const
69 return( body
.GetComment() );
72 void CForm::SetDate( const CStringEx _sxdate
)
74 head
.SetDate( _sxdate
);
77 void CForm::SetVersion( const CStringEx _sxversion
)
79 head
.SetVersion( _sxversion
);
82 void CForm::SetUser( const CStringEx _sxuser
)
84 head
.SetUser( _sxuser
);
87 void CForm::SetComment( const CStringEx _sxcomment
)
89 body
.SetComment( _sxcomment
);
92 CStringEx
CForm::GetParent( unsigned int _index
) const
94 return( body
.GetParent( _index
) );
97 CStringEx
CForm::GetActivity( unsigned int _index
) const
99 return( body
.GetActivity( _index
) );
102 CFormBodyElt
* CForm::GetElt( const CStringEx _sxname
) const
104 return( body
.GetElt( _sxname
) );
107 CFormBodyEltStruct
* CForm::GetBody() const
109 return( (CFormBodyEltStruct
*)(&body
) );
112 bool CForm::GetModified() const
117 void CForm::SetModified( const bool _b
)
122 CForm
& CForm::operator =( const CForm
& _f
)
130 CForm
& CForm::operator +=( const CForm
& _f
)
138 CForm
& CForm::operator -=( const CForm
& _f
)
145 bool CForm::operator ==( const CForm
& _f
) const
147 return( (body
== _f
.body
) );