Version: 9.14.0
ICoCo::MEDIntField Class Reference
Inheritance diagram for ICoCo::MEDIntField:
Collaboration diagram for ICoCo::MEDIntField:

Public Member Functions

MEDCoupling::MEDCouplingFieldInt32 * getMCField () const
 
 MEDIntField ()
 
 MEDIntField (const MEDIntField &field)
 
 MEDIntField (MEDCoupling::MEDCouplingFieldInt32 *field)
 
MEDIntFieldoperator= (const MEDIntField &field)
 
void setMCField (MEDCoupling::MEDCouplingFieldInt32 *f)
 
virtual ~MEDIntField ()
 
- Public Member Functions inherited from ICoCo::Field
const char * getCharName () const
 
const std::string & getName () const
 
void setName (const std::string &name)
 

Additional Inherited Members

- Protected Member Functions inherited from ICoCo::Field
 Field ()
 
virtual ~Field ()
 

Detailed Description

Field data stored internally as a MEDCoupling object.

This class is a wrapper around a MEDCoupling::MEDCouplingFieldInt32 object, which holds the field data. In version 2 of ICoCo, MEDCoupling objects are not anymore exposed directly into the API of ICoCo::Problem. The rationale is to make the interface ICoCo::Problem free of external dependencies (MEDCoupling particularly).

See also
the MEDCoupling documentation, notably the reference counter mechanism used to manage the lifecycle of MEDCoupling objects.

Constructor & Destructor Documentation

◆ MEDIntField() [1/3]

ICoCo::MEDIntField::MEDIntField ( )

Builds an empty field (internal MEDCoupling object not set).

◆ MEDIntField() [2/3]

ICoCo::MEDIntField::MEDIntField ( MEDCoupling::MEDCouplingFieldInt32 *  field)

Builds a field and assign its internal MEDCouplingField object.

The name of 'this' is also automatically set the name of the MEDCouplingField object. If 'field' is null the name is set to the empty string.

Parameters
fieldMEDCoupling field instance to use for field data. The field reference counter is incremented.

◆ MEDIntField() [3/3]

ICoCo::MEDIntField::MEDIntField ( const MEDIntField field)

Copy construcotr.

◆ ~MEDIntField()

virtual ICoCo::MEDIntField::~MEDIntField ( )
virtual

Destructor.

Member Function Documentation

◆ operator=()

MEDIntField& ICoCo::MEDIntField::operator= ( const MEDIntField field)

Assignement operator.

Parameters
fieldanother MEDDoubleField instance. The previous internal MEDCoupling field reference (if any) has its counter decremented.

◆ getMCField()

MEDCoupling::MEDCouplingFieldInt32* ICoCo::MEDIntField::getMCField ( ) const

Get the internal MEDCoupling field object.

Returns
a pointer to the MEDCouplingField object detained by this instance. Note that the corresponding object should not be deleted, or its reference counter should not be decreased! Doing so will result in an invalid instance of the current MEDField.

◆ setMCField()

void ICoCo::MEDIntField::setMCField ( MEDCoupling::MEDCouplingFieldInt32 *  f)

Set the internal MEDCoupling field object.

Any previously set field is discarded (its reference counter is decreased) and the reference counter of the field being set is increased.

The name of 'this' is also automatically set the name of the MEDCouplingField object. If 'field' is nullptr the name is reset to the empty string.

Parameters
fieldMEDCouplingFieldDouble object to be used.