michael@0: /* michael@0: * Copyright (c) 2008-2010 Mozilla Foundation michael@0: * michael@0: * Permission is hereby granted, free of charge, to any person obtaining a michael@0: * copy of this software and associated documentation files (the "Software"), michael@0: * to deal in the Software without restriction, including without limitation michael@0: * the rights to use, copy, modify, merge, publish, distribute, sublicense, michael@0: * and/or sell copies of the Software, and to permit persons to whom the michael@0: * Software is furnished to do so, subject to the following conditions: michael@0: * michael@0: * The above copyright notice and this permission notice shall be included in michael@0: * all copies or substantial portions of the Software. michael@0: * michael@0: * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR michael@0: * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, michael@0: * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL michael@0: * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER michael@0: * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING michael@0: * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER michael@0: * DEALINGS IN THE SOFTWARE. michael@0: */ michael@0: michael@0: #ifndef nsHtml5NamedCharacters_h michael@0: #define nsHtml5NamedCharacters_h michael@0: michael@0: #include "jArray.h" michael@0: #include "nscore.h" michael@0: #include "nsDebug.h" michael@0: #include "prlog.h" michael@0: #include "nsMemory.h" michael@0: michael@0: struct nsHtml5CharacterName { michael@0: uint16_t nameStart; michael@0: uint16_t nameLen; michael@0: #ifdef DEBUG michael@0: int32_t n; michael@0: #endif michael@0: int32_t length() const; michael@0: char16_t charAt(int32_t index) const; michael@0: }; michael@0: michael@0: class nsHtml5NamedCharacters michael@0: { michael@0: public: michael@0: static const nsHtml5CharacterName NAMES[]; michael@0: static const char16_t VALUES[][2]; michael@0: static char16_t** WINDOWS_1252; michael@0: static void initializeStatics(); michael@0: static void releaseStatics(); michael@0: }; michael@0: michael@0: #endif // nsHtml5NamedCharacters_h