00001 #ifndef STYLEUTIL_H 00002 #define STYLEUTIL_H 00003 00004 class Style; 00005 class Song; 00006 struct XNode; 00007 00008 class StyleID 00009 { 00010 CString sGame; 00011 CString sStyle; 00012 00013 public: 00014 StyleID() { Unset(); } 00015 void Unset() { FromStyle(NULL); } 00016 void FromStyle( const Style *p ); 00017 const Style *ToStyle() const; 00018 bool operator<( const StyleID &rhs ) const; 00019 00020 XNode* CreateNode() const; 00021 void LoadFromNode( const XNode* pNode ); 00022 bool IsValid() const; 00023 static void FlushCache( Song* pStaleSong ); 00024 }; 00025 00026 #endif 00027 00028 /* 00029 * (c) 2001-2004 Chris Danford, Glenn Maynard 00030 * All rights reserved. 00031 * 00032 * Permission is hereby granted, free of charge, to any person obtaining a 00033 * copy of this software and associated documentation files (the 00034 * "Software"), to deal in the Software without restriction, including 00035 * without limitation the rights to use, copy, modify, merge, publish, 00036 * distribute, and/or sell copies of the Software, and to permit persons to 00037 * whom the Software is furnished to do so, provided that the above 00038 * copyright notice(s) and this permission notice appear in all copies of 00039 * the Software and that both the above copyright notice(s) and this 00040 * permission notice appear in supporting documentation. 00041 * 00042 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 00043 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 00044 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF 00045 * THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS 00046 * INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT 00047 * OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS 00048 * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR 00049 * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 00050 * PERFORMANCE OF THIS SOFTWARE. 00051 */