text : output

Output the block to the stream.

Any other method of any other object can call this method. This is called 'public' access.

The data-type returned is "voidtype";

This method is contained in the object "text".

The method takes the following arguments:

filedef : Pointer to tgl_structure_parser

Not sure.

obj : Pointer to @schemaobj

Not sure.

This method is overridden from an abstract method with the same signature found in the object @block.

Implementations

C++

The files "tgl_structure_parser.hpp" are included.

Output text, honouring line wrap.

	if (_wrap == 0)
		filedef->write_output(_content);
	else
	{
		// walk through the content and wrap it to n characters wide.
		std::string cur_word = "";
		int line_width = 0;
		for (std::string::iterator i=_content.begin(); i != _content.end(); i++)
		{
			if (std::isspace(*i))
			{
				if ((line_width + (int)cur_word.length() + 1) > _wrap)
				{
					filedef->write_output('\\n');
					line_width = 0;
				}
				filedef->write_output(cur_word + *i);
				line_width += cur_word.length() + 1;
				cur_word = "";
			}
			else
				cur_word += *i;
		}
		filedef->write_output(cur_word);
	}

Generated: Wed Apr 5 23:56:31 EST 2006 using "xsltproc ... docbook.xsl". Copyright (c) 2003, 2004, 2005; Paul Hamilton; pHamtec P/L. Use, modification, and distribution is provided free of any limitations.