as2js: as2js::Output Class Reference

#include <stream.h>

Inheritance diagram for as2js::Output:
Collaboration diagram for as2js::Output:
Public Types typedef std::shared_ptr< Outputpointer_t   Public Member Functions virtual ~Output ()   Positionget_position ()  Get the position object of the input object. More...
  Position const & get_position () const  Get the position object of the input object. More...
  void write (String const &data)  Write data to this output stream. More...
  Protected Member Functions virtual void internal_write (String const &data)=0   Protected Attributes Position f_position = Position()   Detailed Description

Definition at line 253 of file stream.h.

Member Typedef Documentation
typedef std::shared_ptr<Output> as2js::Output::pointer_t

Definition at line 256 of file stream.h.

Constructor & Destructor Documentation
virtual as2js::Output::~Output ( ) inlinevirtual

Definition at line 258 of file stream.h.

Member Function Documentation
Position & as2js::Output::get_position ( )

The stream manages a position object. The call can use this function to retrieve a read/write version of the current position.

Returns
A modifiable version of the position object.

Definition at line 825 of file stream.cpp.

References as2js::Input::f_position.

Position const & as2js::Output::get_position ( ) const

The stream manages a position object. The call can use this function to retrieve a read-only version of the current position.

Returns
A constant version of the position object.

Definition at line 838 of file stream.cpp.

References as2js::Input::f_position.

virtual void as2js::Output::internal_write ( String const &  data) protectedpure virtual
void as2js::Output::write ( String const &  data)

This function writes the specified string to the output stream. Since we pretty much only support text based files, we just use this format.

All outputs are done in UTF-8.

If the function cannot write to the destination, then it throws an error.

Parameters
[in]dataThe string to be written to the output stream.

Definition at line 857 of file stream.cpp.

Member Data Documentation
Position as2js::Output::f_position = Position() protected

Definition at line 268 of file stream.h.


The documentation for this class was generated from the following files:
  • /home/snapwebsites/snapcpp/contrib/as2js/include/as2js/stream.h
  • /home/snapwebsites/snapcpp/contrib/as2js/lib/stream.cpp

This document is part of the Snap! Websites Project.

Copyright by Made to Order Software Corp.

Syndicate content

Snap! Websites
An Open Source CMS System in C++

Contact Us Directly