CodedBase< CodedType > Class Template Reference

Templated wrapper class to reduce code duplication and simplify maintenance of coded classes. More...

Inheritance diagram for CodedBase< CodedType >:
Collaboration diagram for CodedBase< CodedType >:

Public Member Functions

 CodedBase ()
 Construct null. More...
 
 CodedBase (const dictionary &dict)
 Construct from dictionary. More...
 
 CodedBase (const CodedBase< CodedType > &cb)
 Copy constructor. More...
 
virtual ~CodedBase ()
 Destructor. More...
 
virtual const word & codeName () const
 Name of the dynamically generated CodedType. More...
 
virtual const dictionary & codeDict () const
 Get the dictionary to initialize the codeContext. More...
 
void writeCode (Ostream &os) const
 
- Public Member Functions inherited from codedBase
 ClassName ("codedBase")
 Runtime type information. More...
 
 codedBase ()
 Construct null. More...
 
 codedBase (const codedBase &)=delete
 Disallow default bitwise copy construction. More...
 
virtual ~codedBase ()
 Destructor. More...
 
void operator= (const codedBase &)=delete
 Disallow default bitwise assignment. More...
 

Static Public Attributes

static const word codeTemplateC
 Name of the C code template to be used. More...
 
static const word codeTemplateH
 Name of the H code template to be used. More...
 

Additional Inherited Members

- Protected Member Functions inherited from codedBase
void updateLibrary () const
 Update library as required. More...
 
virtual void prepare (dynamicCode &, const dynamicCodeContext &) const =0
 Adapt the context for the current object. More...
 
virtual void clearRedirect () const =0
 Clear any redirected objects. More...
 

Detailed Description

template<class CodedType>
class Foam::CodedBase< CodedType >

Templated wrapper class to reduce code duplication and simplify maintenance of coded classes.

See also
Foam::codeBase
Source files

Definition at line 49 of file CodedBase.H.

Constructor & Destructor Documentation

◆ CodedBase() [1/3]

CodedBase ( )
inline

Construct null.

Definition at line 88 of file CodedBase.H.

Referenced by CodedBase< codedFixedValueFvPatchFieldBase >::CodedBase().

Here is the caller graph for this function:

◆ CodedBase() [2/3]

CodedBase ( const dictionary &  dict)

Construct from dictionary.

Definition at line 59 of file CodedBase.C.

◆ CodedBase() [3/3]

CodedBase ( const CodedBase< CodedType > &  cb)

Copy constructor.

Definition at line 67 of file CodedBase.C.

◆ ~CodedBase()

~CodedBase ( )
virtual

Destructor.

Definition at line 78 of file CodedBase.C.

Referenced by CodedBase< codedFixedValueFvPatchFieldBase >::CodedBase().

Here is the caller graph for this function:

Member Function Documentation

◆ codeName()

const Foam::word & codeName ( ) const
virtual

Name of the dynamically generated CodedType.

Implements codedBase.

Definition at line 85 of file CodedBase.C.

Referenced by CodedBase< codedFixedValueFvPatchFieldBase >::CodedBase().

Here is the caller graph for this function:

◆ codeDict()

const Foam::dictionary & codeDict ( ) const
virtual

Get the dictionary to initialize the codeContext.

Implements codedBase.

Definition at line 93 of file CodedBase.C.

Referenced by CodedBase< codedFixedValueFvPatchFieldBase >::CodedBase().

Here is the caller graph for this function:

◆ writeCode()

void writeCode ( Ostream &  os) const

Definition at line 100 of file CodedBase.C.

Referenced by CodedBase< codedFixedValueFvPatchFieldBase >::CodedBase().

Here is the caller graph for this function:

Member Data Documentation

◆ codeTemplateC

const Foam::word codeTemplateC
static
Initial value:
=
Foam::word(CodedType::typeName_()) + "Template.C"

Name of the C code template to be used.

Definition at line 79 of file CodedBase.H.

◆ codeTemplateH

const Foam::word codeTemplateH
static
Initial value:
=
Foam::word(CodedType::typeName_()) + "Template.H"

Name of the H code template to be used.

Definition at line 82 of file CodedBase.H.


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