Basic_Content_Tester Class Reference

Inheritance diagram for Basic_Content_Tester:

Inheritance graph
[legend]
Collaboration diagram for Basic_Content_Tester:

Collaboration graph
[legend]
List of all members.

Public Member Functions

virtual void characters (const ACEXML_Char *ch, size_t start, size_t length ACEXML_ENV_ARG_DECL)
const ACEXML_Charget_test_string (void)

Static Private Attributes

const ACEXML_Chartest_string_

Member Function Documentation

void Basic_Content_Tester::characters const ACEXML_Char ch,
size_t  start,
size_t length  ACEXML_ENV_ARG_DECL
[virtual]
 

Receive notification of character data.

Reimplemented from ACEXML_DefaultHandler.

Definition at line 41 of file ContentHandler_Test.cpp.

References ACE_ERROR, ACE_TEXT, ACEXML_Char, ACEXML_THROW, LM_ERROR, and ACE_OS::strlen().

00044 {
00045   static int already_called = 0;
00046   static const ACEXML_Char *expect =
00047     ACE_TEXT ("Example\nd'internationalisation");
00048 
00049   if (already_called)
00050     {
00051       ACEXML_THROW (ACEXML_SAXException
00052                     (ACE_TEXT ("characters() called too much\n")));
00053     }
00054   already_called = 1;
00055 
00056   size_t expected_len = ACE_OS::strlen (expect);
00057   if (length != expected_len)
00058     {
00059       ACE_ERROR ((LM_ERROR,
00060                   ACE_TEXT ("characters() expected len %u (%*s); ")
00061                   ACE_TEXT ("got %u (%*s)\n"),
00062                   expected_len, expected_len, ch + start,
00063                   length, length, ch + start));
00064       ACEXML_THROW (ACEXML_SAXException (ACE_TEXT ("Functionality failure")));
00065     }
00066   return;
00067 }

const ACEXML_Char* Basic_Content_Tester::get_test_string void   )  [inline]
 

Definition at line 28 of file ContentHandler_Test.cpp.

References ACEXML_Char, and test_string_.


Member Data Documentation

const ACEXML_Char * Basic_Content_Tester::test_string_ [static, private]
 

Initial value:



  ACE_TEXT ("d&apos;internationalisation</translation>")

Definition at line 35 of file ContentHandler_Test.cpp.

Referenced by get_test_string().


The documentation for this class was generated from the following file:
Generated on Sun Jan 27 13:04:57 2008 for ACEXML by doxygen 1.3.6