v0.10.0
Public Member Functions | Public Attributes | List of all members
MoFEM::Version Struct Reference

#include <src/interfaces/UnknownInterface.hpp>

Public Member Functions

 Version ()
 
 Version (const int v[3])
 
 Version (const int minor, const int major, const int build)
 
DEPRECATED MoFEMErrorCode printVersion (std::string prefix="", MPI_Comm comm=PETSC_COMM_WORLD)
 
std::string strVersion ()
 

Public Attributes

int majorVersion
 
int minorVersion
 
int buildVersion
 

Detailed Description

Definition at line 48 of file UnknownInterface.hpp.

Constructor & Destructor Documentation

◆ Version() [1/3]

MoFEM::Version::Version ( )

Definition at line 52 of file UnknownInterface.hpp.

53  : majorVersion(MoFEM_VERSION_MAJOR), minorVersion(MoFEM_VERSION_MINOR),
54  buildVersion(MoFEM_VERSION_BUILD) {}

◆ Version() [2/3]

MoFEM::Version::Version ( const int  v[3])

Definition at line 55 of file UnknownInterface.hpp.

◆ Version() [3/3]

MoFEM::Version::Version ( const int  minor,
const int  major,
const int  build 
)

Definition at line 57 of file UnknownInterface.hpp.

Member Function Documentation

◆ printVersion()

DEPRECATED MoFEMErrorCode MoFEM::Version::printVersion ( std::string  prefix = "",
MPI_Comm  comm = PETSC_COMM_WORLD 
)
Deprecated:
Prints version

Definition at line 63 of file UnknownInterface.hpp.

64  {
66  if (!prefix.empty()) {
67  prefix += " ";
68  }
69  CHKERR PetscPrintf(comm, "%s%d.%d.%d\n", prefix.c_str(), majorVersion,
72  }
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:485
#define CHKERR
Inline error check.
Definition: definitions.h:604
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:415

◆ strVersion()

std::string MoFEM::Version::strVersion ( )

Definition at line 74 of file UnknownInterface.hpp.

74  {
75  auto str = [](auto v) { return boost::lexical_cast<std::string>(v); };
76  return str(majorVersion) + "." + str(minorVersion) + "." +
77  str(buildVersion);
78  }

Member Data Documentation

◆ buildVersion

int MoFEM::Version::buildVersion

Definition at line 51 of file UnknownInterface.hpp.

◆ majorVersion

int MoFEM::Version::majorVersion

Definition at line 49 of file UnknownInterface.hpp.

◆ minorVersion

int MoFEM::Version::minorVersion

Definition at line 50 of file UnknownInterface.hpp.


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