IT_Bus::FileOutputStream Class Reference

#include <it_bus/file_output_stream.h>

Inheritance diagram for IT_Bus::FileOutputStream:

IT_Bus::OutputStream List of all members.

Detailed Description

Class implementing a file output stream.

Definition at line 19 of file file_output_stream.h.

Public Member Functions

 FileOutputStream (const String &file_name) IT_THROW_DECL((IOException))
 Constructor.
 ~FileOutputStream ()
 Destructor.
virtual void write (const Character to_write) IT_THROW_DECL((IOException))
 Write the character.
virtual void write (const Character *to_write) IT_THROW_DECL((IOException))
 Write the character.
virtual void write (const Character *to_write, size_t length) IT_THROW_DECL((IOException))
 Write the character.
void close ()
 Close the stream after writing.

Private Attributes

FILE * m_fp


Constructor & Destructor Documentation

IT_Bus::FileOutputStream::FileOutputStream ( const String file_name  ) 

Constructor.

Parameters:
String containing the path to, and name of, the output file.


Member Function Documentation

void IT_Bus::FileOutputStream::close (  ) 

Close the stream after writing.

Although an instance of the FileOutputStream may be encapsulated within a specialized stream class, the close() method is called on the FileOutputStream class. For example, in writing the in-memory WSDL model to a file:

 // The WSDL model may be obtained from the Service
 IT_WSDL::WSDLDefinitions &definitions = service.get_definitions();

 // Now initialize an XMLOutputStream and invoke the write()
 // method on the WSDLDefinitions object.
 IT_Bus::FileOutputStream stream("<path to, and name of, the output file>");
 IT_Bus::XMLOutputStream xml_stream(stream, true);
 definitions.write(xml_stream);
 stream.close();
 

virtual void IT_Bus::FileOutputStream::write ( const Character to_write,
size_t  length 
) [virtual]

Write the character.

Parameters:
A pointer to the Character.
Number of characters to write.

Implements IT_Bus::OutputStream.

virtual void IT_Bus::FileOutputStream::write ( const Character to_write  )  [virtual]

Write the character.

Parameters:
A pointer to the Character.

Implements IT_Bus::OutputStream.

virtual void IT_Bus::FileOutputStream::write ( const Character  to_write  )  [virtual]

Write the character.

Parameters:
Character to write to this stream.

Implements IT_Bus::OutputStream.


Generated on Thu Sep 7 11:39:53 2006 for Artix by  doxygen 1.4.7