Subversion Repositories spk

Rev

Rev 48 | Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
46 cycrow 1
#pragma once
2
 
3
#include "Utils/String.h"
4
#include "lists.h"
5
 
6
namespace SPK {
7
namespace Package {
8
 
9
class SPKEXPORT CInstallText
10
{
11
public:
12
	typedef struct SInstallText {
13
		int				iLanguage;
14
		Utils::String	sBefore;
15
		Utils::String	sAfter;
16
	} SInstallText;
17
 
18
	friend class CInstallText;
19
 
20
private:
21
	CLinkList<SInstallText>	_lTexts;
22
 
23
public:
24
	CInstallText(void);
25
	virtual ~CInstallText(void);
26
 
27
	void add(int iLang, const Utils::String &sBefore, const Utils::String &sAfter);
28
	void addBefore(int iLang, const Utils::String &sBefore);
29
	void addAfter(int iLang, const Utils::String &sAfter);
30
 
31
	void remove(int iLang);
32
	void removeBefore(int iLang);
33
	void removeAfter(int iLang);
34
 
35
	Utils::String getBefore(int iLang, bool bIncludeDefault = true) const;
36
	Utils::String getAfter(int iLang, bool bIncludeDefault = true) const;
37
	bool	any() const;
38
 
39
	void merge(const CInstallText *pText);
40
	unsigned int count() const;
41
	int language(unsigned int iPos) const;
42
 
43
private:
44
	SInstallText *_find(int iLang) const;
45
	SInstallText *_new(int iLang);
46
 
47
	void _purge();
48
	SInstallText *_default() const;
49
	SInstallText *_getAt(int iIdx) const;
50
};
51
 
52
}}//NAMESPACE