summaryrefslogtreecommitdiff
path: root/l10ntools/inc
diff options
context:
space:
mode:
authorZolnai Tamás <zolnaitamas2000@gmail.com>2012-10-10 18:37:17 +0200
committerZolnai Tamás <zolnaitamas2000@gmail.com>2012-10-10 19:06:06 +0200
commit8a3ee4e765d4cf849ba0dae811789d633823573e (patch)
tree3f119451043d567cf5ac3e17cc3ca3009f71b9cd /l10ntools/inc
parent06175e8b19625cb5a43b1ae5ae63e419cee7e053 (diff)
Move GenPoEntry out of header
GenPoEntry is part of implementation rather than an autonom class thus its place is in cxx file. Because of pointer members we have to override copy constructor and copy operator. In PoHeader class these methods are unneeded so make it non-copyable. The m_bIsinitialized member's meaning widen with that m_aGenPo points an object. So check it not just in getter but in setter methods too. Change-Id: I26ebb885c81d14820076e0d46625c60cc1cf7984
Diffstat (limited to 'l10ntools/inc')
-rw-r--r--l10ntools/inc/po.hxx49
1 files changed, 7 insertions, 42 deletions
diff --git a/l10ntools/inc/po.hxx b/l10ntools/inc/po.hxx
index fa43b517b437..2e371b476a62 100644
--- a/l10ntools/inc/po.hxx
+++ b/l10ntools/inc/po.hxx
@@ -16,49 +16,13 @@
class PoOfstream;
class PoIfstream;
-
-class GenPoEntry
-{
-private:
-
- OString m_sExtractCom;
- OString m_sReference;
- OString m_sContext;
- OString m_sUnTransStr;
- OString m_sTransStr;
- bool m_bFuzzy;
- bool m_bNull;
-
-public:
-
- GenPoEntry();
- virtual ~GenPoEntry();
- //Default copy constructor and copy operator work well
-
- virtual OString getExtractCom() const { return m_sExtractCom; }
- virtual OString getReference() const { return m_sReference; }
- virtual OString getContext() const { return m_sContext; }
- virtual OString getUnTransStr() const { return m_sUnTransStr; }
- virtual OString getTransStr() const { return m_sTransStr; }
- virtual bool getFuzzy() const { return m_bFuzzy; }
- virtual bool isNull() const { return m_bNull; }
-
- virtual void setExtractCom(const OString& rExtractCom);
- virtual void setReference(const OString& rReference);
- virtual void setContext(const OString& rContext);
- virtual void setUnTransStr(const OString& rUnTransStr);
- virtual void setTransStr(const OString& rTransStr);
- virtual void setFuzzy(const bool bFuzzy);
-
- virtual void writeToFile(std::ofstream& rOFStream) const;
- virtual void readFromFile(std::ifstream& rIFStream);
-};
+class GenPoEntry;
class PoEntry
{
private:
- GenPoEntry m_aGenPo;
+ GenPoEntry* m_pGenPo;
bool m_bIsInitialized;
public:
@@ -76,7 +40,9 @@ public:
PoEntry(const OString& rSDFLine,
const TYPE eType = TTEXT);
~PoEntry();
- //Default copy constructor and copy operator work well
+
+ PoEntry( const PoEntry& rPo );
+ PoEntry& operator=( const PoEntry& rPo );
OString getSourceFile() const;
OString getGroupId() const;
@@ -95,11 +61,11 @@ public:
};
-class PoHeader
+class PoHeader: private boost::noncopyable
{
private:
- GenPoEntry m_aGenPo;
+ GenPoEntry* m_pGenPo;
bool m_bIsInitialized;
public:
@@ -113,7 +79,6 @@ public:
PoHeader( const OString& rExtSrc );
PoHeader( std::ifstream& rOldPo );
~PoHeader();
- //Default copy constructor and copy operator work well
OString getLanguage() const;
};