mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-23 01:44:22 +00:00
Added Value support to the Button's toggle state and TextEditor content. Refactored the atomic operation functions to live inside a class called Atomic, and the byte order functions into a class called ByteOrder.
This commit is contained in:
parent
3ddbc82f9f
commit
18ffeba9da
64 changed files with 3721 additions and 3609 deletions
|
|
@ -31,20 +31,6 @@ BEGIN_JUCE_NAMESPACE
|
|||
#include "../io/streams/juce_FileInputSource.h"
|
||||
|
||||
|
||||
//==============================================================================
|
||||
static bool isXmlIdentifierChar_Slow (const tchar c) throw()
|
||||
{
|
||||
return CharacterFunctions::isLetterOrDigit (c)
|
||||
|| c == T('_')
|
||||
|| c == T('-')
|
||||
|| c == T(':')
|
||||
|| c == T('.');
|
||||
}
|
||||
|
||||
#define isXmlIdentifierChar(c) \
|
||||
((c > 0 && c <= 127) ? identifierLookupTable [(int) c] : isXmlIdentifierChar_Slow (c))
|
||||
|
||||
|
||||
//==============================================================================
|
||||
XmlDocument::XmlDocument (const String& documentText) throw()
|
||||
: originalText (documentText),
|
||||
|
|
@ -71,6 +57,21 @@ void XmlDocument::setEmptyTextElementsIgnored (const bool shouldBeIgnored) throw
|
|||
ignoreEmptyTextElements = shouldBeIgnored;
|
||||
}
|
||||
|
||||
bool XmlDocument::isXmlIdentifierCharSlow (const tchar c) throw()
|
||||
{
|
||||
return CharacterFunctions::isLetterOrDigit (c)
|
||||
|| c == T('_')
|
||||
|| c == T('-')
|
||||
|| c == T(':')
|
||||
|| c == T('.');
|
||||
}
|
||||
|
||||
inline bool XmlDocument::isXmlIdentifierChar (const tchar c) const throw()
|
||||
{
|
||||
return (c > 0 && c <= 127) ? identifierLookupTable [(int) c]
|
||||
: isXmlIdentifierCharSlow (c);
|
||||
}
|
||||
|
||||
XmlElement* XmlDocument::getDocumentElement (const bool onlyReadOuterDocumentElement)
|
||||
{
|
||||
String textToParse (originalText);
|
||||
|
|
@ -108,7 +109,7 @@ XmlElement* XmlDocument::getDocumentElement (const bool onlyReadOuterDocumentEle
|
|||
needToLoadDTD = true;
|
||||
|
||||
for (int i = 0; i < 128; ++i)
|
||||
identifierLookupTable[i] = isXmlIdentifierChar_Slow ((tchar) i);
|
||||
identifierLookupTable[i] = isXmlIdentifierCharSlow ((tchar) i);
|
||||
|
||||
if (textToParse.isEmpty())
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue