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 #ifndef NLGEORGES_ITEM_H
18 #define NLGEORGES_ITEM_H
20 #include "string_ex.h"
23 namespace NLOLDGEORGES
36 CItemEltStruct
* pitemes
;
37 // CItemEltList* pitemelparents;
38 // CItemEltAtom* pitemeacomments;
39 std::vector
< std::pair
< CStringEx
, CStringEx
> > vsxparents
;
40 CStringEx moldfilename
;
47 void SetLoader( CLoader
* const _pl
);
48 void New( const CStringEx
& _sxdfnfilename
);
49 void Load( const CStringEx
& _sxfilename
);
50 void Load( const CStringEx
& _sxfilename
, const CStringEx _sxdate
);
51 void Save( const CStringEx
& _sxfilename
);
54 // Convert CItem to a CForm (in is this)
55 void MakeForm (CForm
&out
);
56 // Convert CForm to CItem (out is this)
57 void MakeItem (CForm
&in
);
59 void SetCurrentValue( const unsigned int _index
, const CStringEx s
);
60 uint
GetNbElt() const;
61 uint
GetNbParents() const;
62 uint
GetNbElt( const unsigned int _index
) const;
63 uint
GetInfos( const unsigned int _index
) const;
64 CStringEx
GetName( const unsigned int _index
) const;
65 CStringEx
GetCurrentResult( const unsigned int _index
) const;
66 CStringEx
GetCurrentValue( const unsigned int _index
) const;
67 CStringEx
GetFormula( const unsigned int _index
) const;
68 bool IsEnum( const unsigned int _index
) const;
69 bool IsPredef( const unsigned int _index
) const;
70 bool CanEdit( const unsigned int _index
) const;
71 void GetListPredef( const unsigned int _index
, std::vector
< CStringEx
>& _vsx
) const;
73 CItemElt
* GetElt( const unsigned int _index
) const;
74 CItemElt
* GetElt( const CStringEx _sxname
) const;
76 void AddList( const unsigned int _index
) const;
77 void DelListChild( const unsigned int _index
) const;
78 void VirtualSaveLoad();
80 void AddParent( const unsigned int _index
= 0);
81 void DelParent( const unsigned int _index
);
83 CStringEx
GetParent( const unsigned int _index
) const;
84 void SetParent( const unsigned int _index
, const CStringEx _sx
);
85 CStringEx
GetActivity( const unsigned int _index
) const;
86 void SetActivity( const unsigned int _index
, const CStringEx _sx
);
91 #endif // NLGEORGES_ITEM_H