StringStreamAllocator< StreamType > Class Template Reference

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

Inheritance diagram for StringStreamAllocator< StreamType >:
[legend]

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
protected

The stream type.

Definition at line 65 of file StringStream.H.

Constructor & Destructor Documentation

◆ StringStreamAllocator() [1/2]

StringStreamAllocator ( )
protecteddefault

Default construct.

◆ StringStreamAllocator() [2/2]

StringStreamAllocator ( const std::string &  s)
inlineprotected

Copy construct from string.

Definition at line 77 of file StringStream.H.

Member Function Documentation

◆ str() [1/2]

Foam::string str ( ) const
inline

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

Definition at line 88 of file StringStream.H.

References StringStreamAllocator< StreamType >::stream_.

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

Here is the caller graph for this function:

◆ str() [2/2]

void str ( const std::string &  s)
inline

Set the string.

Definition at line 94 of file StringStream.H.

References s(), and StringStreamAllocator< StreamType >::stream_.

Here is the call graph for this function:

Member Data Documentation

◆ stream_

stream_type stream_
protected

The input/output stream.

Definition at line 68 of file StringStream.H.

Referenced by StringStreamAllocator< StreamType >::str().


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