Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mpc-hc/mpc-hc.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortetsuo55 <tetsuo55@users.sourceforge.net>2010-04-09 01:14:58 +0400
committertetsuo55 <tetsuo55@users.sourceforge.net>2010-04-09 01:14:58 +0400
commita9b7bf3fb3e1334d8defd05ca4cfae870b4912e5 (patch)
tree2dab453d94d5e003379a6cc895eceb84c80e23ec /src/subtitles/RealTextParser.h
parentaafd49a91f7c2fa9c7103971c16fa6e1b29e8bfd (diff)
astyle formatting cleanup to make the sourcecode more accessible
switch used: astyle --style=ansi --min-conditional-indent=0 --pad=oper --unpad=paren http://astyle.sourceforge.net/ git-svn-id: https://mpc-hc.svn.sourceforge.net/svnroot/mpc-hc/trunk@1783 10f7b99b-c216-0410-bff0-8a66a9350fd8
Diffstat (limited to 'src/subtitles/RealTextParser.h')
-rw-r--r--src/subtitles/RealTextParser.h102
1 files changed, 51 insertions, 51 deletions
diff --git a/src/subtitles/RealTextParser.h b/src/subtitles/RealTextParser.h
index 06247e430..a297914f5 100644
--- a/src/subtitles/RealTextParser.h
+++ b/src/subtitles/RealTextParser.h
@@ -24,79 +24,79 @@ using std::towlower;
class CRealTextParser
{
public:
- CRealTextParser();
- virtual ~CRealTextParser(void);
+ CRealTextParser();
+ virtual ~CRealTextParser(void);
- struct Tag
- {
- Tag(): m_bOpen(false), m_bClose(false), m_bComment(false), m_bText(false) {}
+ struct Tag
+ {
+ Tag(): m_bOpen(false), m_bClose(false), m_bComment(false), m_bText(false) {}
- wstring m_szName;
+ wstring m_szName;
- bool m_bOpen;
- bool m_bClose;
+ bool m_bOpen;
+ bool m_bClose;
- bool m_bComment;
- bool m_bText;
+ bool m_bComment;
+ bool m_bText;
- map<wstring, wstring> m_mapAttributes;
- };
+ map<wstring, wstring> m_mapAttributes;
+ };
- struct Subtitles
- {
- Subtitles(): m_WindowTag(), m_FontTag(), m_bCenter(false) {}
+ struct Subtitles
+ {
+ Subtitles(): m_WindowTag(), m_FontTag(), m_bCenter(false) {}
- Tag m_WindowTag;
- Tag m_FontTag;
+ Tag m_WindowTag;
+ Tag m_FontTag;
- bool m_bCenter;
+ bool m_bCenter;
- map<pair<int, int>, wstring> m_mapLines;
- };
+ map<pair<int, int>, wstring> m_mapLines;
+ };
- bool ParseRealText(wstring p_szFile);
+ bool ParseRealText(wstring p_szFile);
- const Subtitles& GetParsedSubtitles();
+ const Subtitles& GetParsedSubtitles();
- bool OutputSRT(wostream& p_rOutput);
+ bool OutputSRT(wostream& p_rOutput);
private:
- bool ExtractTag(wstring& p_rszLine, Tag& p_rTag);
- bool ExtractTextTag(wstring& p_rszLine, Tag& p_rTag);
- bool ExtractString(wstring& p_rszLine, wstring& p_rszString);
- bool SkipSpaces(wstring& p_rszLine, unsigned int& p_riPos);
- bool GetString(wstring& p_rszLine, unsigned int& p_riPos, wstring& p_rszString, const wstring& p_crszEndChars);
- bool GetAttributes(wstring& p_rszLine, unsigned int& p_riPos, map<wstring, wstring>& p_rmapAttributes);
+ bool ExtractTag(wstring& p_rszLine, Tag& p_rTag);
+ bool ExtractTextTag(wstring& p_rszLine, Tag& p_rTag);
+ bool ExtractString(wstring& p_rszLine, wstring& p_rszString);
+ bool SkipSpaces(wstring& p_rszLine, unsigned int& p_riPos);
+ bool GetString(wstring& p_rszLine, unsigned int& p_riPos, wstring& p_rszString, const wstring& p_crszEndChars);
+ bool GetAttributes(wstring& p_rszLine, unsigned int& p_riPos, map<wstring, wstring>& p_rmapAttributes);
- int GetTimecode(const wstring& p_crszTimecode);
- wstring FormatTimecode(int iTimecode,
- int iMillisecondPrecision = 3,
- bool p_bPadZeroes = true,
- const wstring& p_crszSeparator = L":",
- const wstring& p_crszMillisecondSeparator = L".");
+ int GetTimecode(const wstring& p_crszTimecode);
+ wstring FormatTimecode(int iTimecode,
+ int iMillisecondPrecision = 3,
+ bool p_bPadZeroes = true,
+ const wstring& p_crszSeparator = L":",
+ const wstring& p_crszMillisecondSeparator = L".");
- wstring StringToLower(const wstring& p_crszString);
+ wstring StringToLower(const wstring& p_crszString);
- wstring RenderTags(const list<Tag>& p_crlTags);
+ wstring RenderTags(const list<Tag>& p_crlTags);
- void PopTag(list<Tag>& p_rlistTags, const wstring& p_crszTagName);
+ void PopTag(list<Tag>& p_rlistTags, const wstring& p_crszTagName);
- // Filter out for example multiple font tags opened previously (font tags are not always terminated properly in realtext and can build up)
- void FilterReduntantTags(list<Tag>& p_rlistTags);
+ // Filter out for example multiple font tags opened previously (font tags are not always terminated properly in realtext and can build up)
+ void FilterReduntantTags(list<Tag>& p_rlistTags);
-
- Subtitles m_RealText;
- bool m_bIgnoreFont;
- bool m_bIgnoreFontSize;
- bool m_bIgnoreFontColor;
- bool m_bIgnoreFontWeight;
- bool m_bIgnoreFontFace;
+ Subtitles m_RealText;
- int m_iMinFontSize;
- int m_iMaxFontSize;
+ bool m_bIgnoreFont;
+ bool m_bIgnoreFontSize;
+ bool m_bIgnoreFontColor;
+ bool m_bIgnoreFontWeight;
+ bool m_bIgnoreFontFace;
- int m_iDefaultSubtitleDurationInMillisecs;
+ int m_iMinFontSize;
+ int m_iMaxFontSize;
- bool m_bTryToIgnoreErrors;
+ int m_iDefaultSubtitleDurationInMillisecs;
+
+ bool m_bTryToIgnoreErrors;
};