Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members

TitleSubstitution.h

Go to the documentation of this file.
00001 /* TitleSubst - automatic translation for song titles */ 00002 00003 #ifndef TITLE_SUBSTITUTION_H 00004 #define TITLE_SUBSTITUTION_H 1 00005 00006 struct TitleFields 00007 { 00008 void SaveToStrings( CString &sTitle, CString &sSubtitle, CString &sArtist, 00009 CString &sTitleTranslit, CString &sSubtitleTranslit, CString &sArtistTranslit ) const 00010 { 00011 sTitle = Title; 00012 sSubtitle = Subtitle; 00013 sArtist = Artist; 00014 sTitleTranslit = TitleTranslit; 00015 sSubtitleTranslit = SubtitleTranslit; 00016 sArtistTranslit = ArtistTranslit; 00017 } 00018 00019 void LoadFromStrings( CString sTitle, CString sSubtitle, CString sArtist, 00020 CString sTitleTranslit, CString sSubtitleTranslit, CString sArtistTranslit ) 00021 { 00022 Title = sTitle; 00023 Subtitle = sSubtitle; 00024 Artist = sArtist; 00025 TitleTranslit = sTitleTranslit; 00026 SubtitleTranslit = sSubtitleTranslit; 00027 ArtistTranslit = sArtistTranslit; 00028 } 00029 CString Title, Subtitle, Artist; 00030 CString TitleTranslit, SubtitleTranslit, ArtistTranslit; 00031 }; 00032 struct TitleTrans; 00033 00034 class TitleSubst 00035 { 00036 vector<TitleTrans *> ttab; 00037 00038 void AddTrans(const TitleTrans &tr); 00039 public: 00040 TitleSubst(const CString &section); 00041 ~TitleSubst(); 00042 00043 void Load(const CString &filename, const CString &section); 00044 00045 void Subst( TitleFields &tf ); 00046 }; 00047 00048 #endif 00049 00050 /* 00051 * (c) 2003-2004 Glenn Maynard 00052 * All rights reserved. 00053 * 00054 * Permission is hereby granted, free of charge, to any person obtaining a 00055 * copy of this software and associated documentation files (the 00056 * "Software"), to deal in the Software without restriction, including 00057 * without limitation the rights to use, copy, modify, merge, publish, 00058 * distribute, and/or sell copies of the Software, and to permit persons to 00059 * whom the Software is furnished to do so, provided that the above 00060 * copyright notice(s) and this permission notice appear in all copies of 00061 * the Software and that both the above copyright notice(s) and this 00062 * permission notice appear in supporting documentation. 00063 * 00064 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 00065 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 00066 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF 00067 * THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS 00068 * INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT 00069 * OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS 00070 * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR 00071 * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 00072 * PERFORMANCE OF THIS SOFTWARE. 00073 */

Generated on Thu Jan 27 20:57:34 2005 for StepMania by doxygen 1.3.7