Use configured resolution for login/outgame/ingame
[ryzomcore.git] / ryzom / tools / leveldesign / georges_convert / form.cpp
blobfa07b1fd7557c572324afe1a95df771bfb297dc4
1 // Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
2 // Copyright (C) 2010 Winch Gate Property Limited
3 //
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.
8 //
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"
19 #include "form.h"
20 #include "form_body_elt.h"
22 namespace NLOLDGEORGES
25 //////////////////////////////////////////////////////////////////////
26 // Construction/Destruction
27 //////////////////////////////////////////////////////////////////////
29 CForm::CForm()
31 body.SetName( "BODY" );
32 bmodified = false;
35 CForm::CForm( const CForm& _f )
37 bmodified = _f.bmodified;
38 head = _f.head;
39 body = _f.body;
42 CForm::~CForm()
46 void CForm::serial( NLMISC::IStream& s )
48 s.serial( head );
49 s.serial( body );
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
114 return( bmodified );
117 void CForm::SetModified( const bool _b )
119 bmodified = _b;
122 CForm& CForm::operator =( const CForm& _f )
124 head = _f.head;
125 body = _f.body;
126 bmodified = true;
127 return( *this );
130 CForm& CForm::operator +=( const CForm& _f )
132 head = _f.head;
133 body += _f.body;
134 bmodified = true;
135 return( *this );
138 CForm& CForm::operator -=( const CForm& _f )
140 body -= _f.body;
141 bmodified = true;
142 return( *this );
145 bool CForm::operator ==( const CForm& _f ) const
147 return( (body == _f.body) );