trunk/branch integration: source indentation

This commit is contained in:
Marian Krivos 2011-08-23 07:12:30 +00:00
parent c349742cf5
commit e0b35c7ef5
2 changed files with 293 additions and 230 deletions

View File

@ -1,7 +1,7 @@
//
// TypeList.h
//
// $Id: //poco/svn/Foundation/include/Poco/TypeList.h#3 $
// $Id: //poco/1.4/Foundation/include/Poco/TypeList.h#1 $
//
// Library: Foundation
// Package: Core
@ -40,8 +40,8 @@
//
#ifndef Foundation_TypeList_INCLUDED
#define Foundation_TypeList_INCLUDED
#ifndef Foundation_TypeList_INCLUDED
#define Foundation_TypeList_INCLUDED
#include "Poco/Foundation.h"
@ -484,4 +484,4 @@ struct TypeAllReplacer<TypeList<Head, Tail>, T, R>
} // namespace Poco
#endif
#endif // Foundation_TypeList_INCLUDED

View File

@ -198,12 +198,24 @@ public:
};
static void properties(int ch, CharacterProperties& props);
/// Return the Unicode character properties for the
/// character with the given Unicode value.
/// Return the Unicode character properties for the
/// character with the given Unicode value.
static bool isLower(int ch);
/// Returns true iff the given character is a lowercase
/// character.
static bool isSpace(int ch);
/// Returns true iff the given character is a separator.
static bool isDigit(int ch);
/// Returns true iff the given character is a numeric character.
static bool isPunct(int ch);
/// Returns true iff the given character is a punctuation character.
static bool isAlpha(int ch);
/// Returns true iff the given character is a letter.
static bool isLower(int ch);
/// Returns true iff the given character is a lowercase
/// character.
static bool isUpper(int ch);
/// Returns true iff the given character is an uppercase
@ -221,6 +233,57 @@ public:
};
//
// inlines
//
inline bool Unicode::isSpace(int ch)
{
CharacterProperties props;
properties(ch, props);
return props.category == UCP_SEPARATOR;
}
inline bool Unicode::isDigit(int ch)
{
CharacterProperties props;
properties(ch, props);
return props.category == UCP_NUMBER;
}
inline bool Unicode::isPunct(int ch)
{
CharacterProperties props;
properties(ch, props);
return props.category == UCP_PUNCTUATION;
}
inline bool Unicode::isAlpha(int ch)
{
CharacterProperties props;
properties(ch, props);
return props.category == UCP_LETTER;
}
inline bool Unicode::isLower(int ch)
{
CharacterProperties props;
properties(ch, props);
return props.category == UCP_LETTER && props.type == UCP_LOWER_CASE_LETTER;
}
inline bool Unicode::isUpper(int ch)
{
CharacterProperties props;
properties(ch, props);
return props.category == UCP_LETTER && props.type == UCP_UPPER_CASE_LETTER;
}
} // namespace Poco