StringStreamAllocator< StreamType > Class Template Reference

Allocator for variants of a std stringstream. More...

Inheritance diagram for StringStreamAllocator< StreamType >:
Collaboration diagram for StringStreamAllocator< StreamType >:

Public Member Functions

Foam::string str () const
 Get the string - as Foam::string rather than std::string. More...
void str (const std::string &s)
 Set the string. More...

Protected Types

typedef StreamType stream_type
 The stream type. More...

Protected Member Functions

 StringStreamAllocator ()=default
 Default construct. More...
 StringStreamAllocator (const std::string &s)
 Copy construct from string. More...

Protected Attributes

stream_type stream_
 The input/output stream. More...

Detailed Description

template<class StreamType>
class Foam::Detail::StringStreamAllocator< StreamType >

Allocator for variants of a std stringstream.

Definition at line 58 of file StringStream.H.

Member Typedef Documentation

◆ stream_type

typedef StreamType stream_type

The stream type.

Definition at line 65 of file StringStream.H.

Constructor & Destructor Documentation

◆ StringStreamAllocator() [1/2]

StringStreamAllocator ( )

Default construct.

◆ StringStreamAllocator() [2/2]

StringStreamAllocator ( const std::string &  s)

Copy construct from string.

Definition at line 77 of file StringStream.H.

Member Function Documentation

◆ str() [1/2]

Foam::string str ( ) const

Get the string - as Foam::string rather than std::string.

Definition at line 88 of file StringStream.H.

Referenced by Foam::entryToString(), Foam::name(), entry::operator==(), expressionEntry::toExprStr(), accessor::toString(), and ITstream::toString().

Here is the caller graph for this function:

◆ str() [2/2]

void str ( const std::string &  s)

Set the string.

Definition at line 94 of file StringStream.H.

Member Data Documentation

◆ stream_

stream_type stream_

The input/output stream.

Definition at line 68 of file StringStream.H.

Referenced by StringStreamAllocator< std::istringstream >::str().

The documentation for this class was generated from the following file: