latest changes from main repository

This commit is contained in:
Guenter Obiltschnig
2007-04-25 08:39:02 +00:00
parent f29f7cda53
commit 3e46ab332b
60 changed files with 1619 additions and 163 deletions

View File

@@ -1,13 +1,13 @@
//
// ASCIIEncoding.cpp
//
// $Id: //poco/Main/Foundation/src/ASCIIEncoding.cpp#11 $
// $Id: //poco/Main/Foundation/src/ASCIIEncoding.cpp#12 $
//
// Library: Foundation
// Package: Text
// Module: ASCIIEncoding
//
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
// Copyright (c) 2004-2007, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// Permission is hereby granted, free of charge, to any person or organization
@@ -35,11 +35,19 @@
#include "Poco/ASCIIEncoding.h"
#include "Poco/String.h"
namespace Poco {
const char* ASCIIEncoding::_names[] =
{
"ASCII",
NULL
};
const TextEncoding::CharacterMap ASCIIEncoding::_charMap =
{
/* 00 */ 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
@@ -71,6 +79,23 @@ ASCIIEncoding::~ASCIIEncoding()
}
const char* ASCIIEncoding::canonicalName() const
{
return _names[0];
}
bool ASCIIEncoding::isA(const std::string& encodingName) const
{
for (const char** name = _names; *name; ++name)
{
if (Poco::icompare(encodingName, *name) == 0)
return true;
}
return false;
}
const TextEncoding::CharacterMap& ASCIIEncoding::characterMap() const
{
return _charMap;