1.4.0
CCC
 
pile.cpp File Reference
#include "geoslib_old_f.h"

Functions

static void st_valid (int type, int rank)
 
void pile_reset (int type)
 
void piles_reset (void)
 
int pile_next (int type)
 
void pile_manage (int type, int rank, int mode, char *ptr)
 
int pile_correct (int type, int rank, int mode)
 
char * pile_get (int type, int rank)
 
void piles_dump (void)
 

Variables

static int DEBUG = 0
 
static int MAX_PILE = 10
 
static const char * PILE_NAME []
 
static int MAX_COUNT [] = { 10, 4, 4, 2, 4, 1, 1, 1, 2, 2 }
 
static char *** piles
 

Function Documentation

◆ pile_correct()

int pile_correct ( int  type,
int  rank,
int  mode 
)

Check if the Pile is managed correctly

Returns
1 if the Pile Management is incorrect; 0 otherwise
Parameters
[in]typeType of the pile
[in]rankRank of the slot
[in]modeStatus
  • 1 : Check that the element must be already allocated
  • -1 : Check that the element will be allocated

◆ pile_get()

char* pile_get ( int  type,
int  rank 
)

Returns the address managed in the pile

Parameters
[in]typeType of the pile
[in]rankRank of the slot

◆ pile_manage()

void pile_manage ( int  type,
int  rank,
int  mode,
char *  ptr 
)

Manage the pile

Parameters
[in]typeType of the pile
[in]rankRank of the slot
[in]mode1 for allocation and -1 for deallocation
[in]ptrPointor to be stored (allocation mode)

◆ pile_next()

int pile_next ( int  type)

Returns the rank of the first free element

Returns
Rank of the first available slot or -1 if failure
Parameters
[in]typeType of the pile

◆ pile_reset()

void pile_reset ( int  type)

Reset one pile

Parameters
[in]typeType of the pile
Remarks
This function must be called compulsorily when entering RGeostats

◆ piles_dump()

void piles_dump ( void  )

Dump the piles contents

◆ piles_reset()

void piles_reset ( void  )

Reset all the piles

Remarks
This function must be called compulsorily when entering RGeostats

◆ st_valid()

static void st_valid ( int  type,
int  rank 
)
static

Check that the type is valid or abort if invalid

Parameters
[in]typeType of the pile
[in]rankRank of the slot (-1 if not defined)

Variable Documentation

◆ DEBUG

int DEBUG = 0
static

◆ MAX_COUNT

int MAX_COUNT[] = { 10, 4, 4, 2, 4, 1, 1, 1, 2, 2 }
static

◆ MAX_PILE

int MAX_PILE = 10
static

◆ PILE_NAME

const char* PILE_NAME[]
static
Initial value:
= { "Db",
"Vario",
"Model",
"Neigh",
"Rule",
"AAnam",
"Tokens",
"Polygon",
"Fracture",
"PCA" }

◆ piles

char*** piles
static