base Class Reference

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

Inheritance diagram for base:
[legend]

Public Member Functions

 base ()
 Default construct. Initializes the global-state. More...
 
 ~base ()
 Destructor: close file. More...
 
bool close ()
 Explicitly close the file and terminate ccmio access. More...
 

Protected Member Functions

bool assertNoError (const char *msg) const
 check global state for errors and die as required More...
 
bool assertNoError (const std::string &msg) const
 check global state for errors and die as required More...
 
 base (const base &)=delete
 No copy construct. More...
 
void operator= (const base &)=delete
 No copy assignment. More...
 

Static Protected Member Functions

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

Protected Attributes

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

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 62 of file ccmBase.H.

Constructor & Destructor Documentation

◆ base() [1/2]

base ( const base )
protecteddelete

No copy construct.

◆ base() [2/2]

base ( )

Default construct. Initializes the global-state.

Definition at line 68 of file ccmBase.C.

◆ ~base()

~base ( )

Destructor: close file.

Definition at line 76 of file ccmBase.C.

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 34 of file ccmBase.C.

Referenced by reader::reader().

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 44 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 54 of file ccmBase.C.

◆ 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 60 of file ccmBase.C.

◆ operator=()

void operator= ( const base )
protecteddelete

No copy assignment.

◆ close()

bool close ( )

Explicitly close the file and terminate ccmio access.

Return false if it was already closed.

Definition at line 84 of file ccmBase.C.

Member Data Documentation

◆ globalState_

std::unique_ptr<ccmGlobalState> globalState_
protected

Maintain overall global states (error, root-node)

Definition at line 69 of file ccmBase.H.

Referenced by reader::reader().


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