Loading...
Searching...
No Matches
base Class Reference

Base functionality common to reader and writer classes. More...

#include <ccmBase.H>

Inheritance diagram for base:

Public Member Functions

 base (const base &)=delete
 No copy construct.
void operator= (const base &)=delete
 No copy assignment.
 base ()
 Default construct. Initializes the global-state.
 ~base ()
 Destructor: close file.
bool close ()
 Explicitly close the file and terminate ccmio access.

Protected Member Functions

bool assertNoError (const char *msg) const
 check global state for errors and die as required
bool assertNoError (const std::string &msg) const
 check global state for errors and die as required

Static Protected Member Functions

static bool assertNoError (int err, const char *msg)
 Die with msg if there is an error.
static bool assertNoError (int err, const std::string &msg)
 Die with msg if there is an error.

Protected Attributes

std::unique_ptr< ccmGlobalState > globalState_
 Maintain overall global states (error, root-node).

Detailed Description

Base functionality common to reader and writer classes.

Note
this class is in development
  • any/all of the class names and members may change
Source files

Definition at line 70 of file ccmBase.H.

Constructor & Destructor Documentation

◆ base() [1/2]

base ( const base & )
delete

No copy construct.

References base().

Referenced by base(), operator=(), reader::reader(), and writer::writer().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ base() [2/2]

base ( )

Default construct. Initializes the global-state.

Definition at line 61 of file ccmBase.C.

References globalState_.

◆ ~base()

~base ( )

Destructor: close file.

Definition at line 69 of file ccmBase.C.

References close().

Here is the call graph for this function:

Member Function Documentation

◆ assertNoError() [1/4]

bool assertNoError ( int err,
const char * msg )
staticprotected

Die with msg if there is an error.

Return true if there is no error

Definition at line 27 of file ccmBase.C.

Referenced by reader::reader(), reader::readField(), writer::writeGeometry(), and writer::writeSolution().

Here is the caller graph for this function:

◆ assertNoError() [2/4]

bool assertNoError ( int err,
const std::string & msg )
staticprotected

Die with msg if there is an error.

Return true if there is no error

Definition at line 37 of file ccmBase.C.

◆ assertNoError() [3/4]

bool assertNoError ( const char * msg) const
protected

check global state for errors and die as required

Return true if there is no error

Definition at line 47 of file ccmBase.C.

References globalState_.

◆ assertNoError() [4/4]

bool assertNoError ( const std::string & msg) const
protected

check global state for errors and die as required

Return true if there is no error

Definition at line 53 of file ccmBase.C.

References globalState_.

◆ operator=()

void operator= ( const base & )
delete

No copy assignment.

References base().

Here is the call graph for this function:

◆ close()

bool close ( )

Explicitly close the file and terminate ccmio access.

Return false if it was already closed.

Definition at line 77 of file ccmBase.C.

References globalState_.

Referenced by ~base(), reader::~reader(), and writer::~writer().

Here is the caller graph for this function:

Member Data Documentation

◆ globalState_

std::unique_ptr<ccmGlobalState> globalState_
protected

Maintain overall global states (error, root-node).

Definition at line 79 of file ccmBase.H.

Referenced by assertNoError(), assertNoError(), base(), close(), reader::reader(), reader::readField(), writer::writeGeometry(), and writer::writeSolution().


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