Geant4-11
Functions
xDataTOM_LegendreSeries.cc File Reference
#include <string.h>
#include "xDataTOM_private.h"

Go to the source code of this file.

Functions

int xDataTOM_LegendreSeries_initialize (statusMessageReporting *smr, xDataTOM_LegendreSeries *LegendreSeries, int index, int length, double value)
 
int xDataTOM_LegendreSeries_release (xDataTOM_LegendreSeries *LegendreSeries)
 

Function Documentation

◆ xDataTOM_LegendreSeries_initialize()

int xDataTOM_LegendreSeries_initialize ( statusMessageReporting smr,
xDataTOM_LegendreSeries LegendreSeries,
int  index,
int  length,
double  value 
)

Definition at line 17 of file xDataTOM_LegendreSeries.cc.

17 {
18
19 LegendreSeries->LegendreSeries = NULL;
20 LegendreSeries->index = index;
21 LegendreSeries->length = length;
22 LegendreSeries->value = value;
23 if( ( LegendreSeries->LegendreSeries = (double *) smr_malloc2( smr, length * sizeof( double ), 0, "LegendreSeries->LegendreSeries" ) ) == NULL ) return( 1 );
24
25 return( 0 );
26}
#define smr_malloc2(smr, size, zero, forItem)

References xDataTOM_LegendreSeries_s::index, xDataTOM_LegendreSeries_s::LegendreSeries, xDataTOM_LegendreSeries_s::length, smr_malloc2, and xDataTOM_LegendreSeries_s::value.

Referenced by xDataXML_LegendreSeriesDataToTOM().

◆ xDataTOM_LegendreSeries_release()

int xDataTOM_LegendreSeries_release ( xDataTOM_LegendreSeries LegendreSeries)

Definition at line 30 of file xDataTOM_LegendreSeries.cc.

30 {
31
32 if( LegendreSeries == NULL ) return( 0 );
33 smr_freeMemory( (void **) &(LegendreSeries->LegendreSeries) );
34 return( 0 );
35}
void * smr_freeMemory(void **p)

References xDataTOM_LegendreSeries_s::LegendreSeries, and smr_freeMemory().

Referenced by xDataTOM_W_XYs_LegendreSeries_release(), and xDataXML_LegendreSeriesDataToTOM().