#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "syspro.h"
#include "sysprotransform.h"
#include "syspro_impl.h"
Go to the source code of this file.
Defines | |
#define | LINELEN 1500 |
#define | REPOSITION(a, b) |
#define | MAXLEN 500 |
Functions | |
PetscErrorCode | GetFirstPreprocessor (char **preprocess) |
PetscErrorCode | GetNextPreprocessor (char **next_one) |
PetscErrorCode | SuccessorPreprocessor (char *this_one, char **next_one) |
PetscErrorCode | StartRetrievingCurrentPreprocessors (char **cclass, char **type, int *opt, PetscTruth *success) |
PetscErrorCode | ContinueRetrievingCurrentPreprocessors (char **cclass, char **type, int *opt, PetscTruth *success) |
PetscErrorCode | StartRetrievingAllPreprocessors (char **cclass, char ***types, int *ntypes, PetscTruth *success) |
PetscErrorCode | InitRetrievingPreprocessors () |
PetscErrorCode | ContinueRetrievingAllPreprocessors (char **cclass, char ***types, int *ntypes, PetscTruth *success) |
PetscErrorCode | RetrieveAllPreprocessorValues (char *cclass, char ***types, int *ntypes) |
static PetscErrorCode | TabReportPreprocessors (PetscTruth active, char **key, char **val, int separator) |
PetscErrorCode | TabReportAllPreprocessors (char **key, int separator) |
PetscErrorCode | TabReportActivePreprocessors (char **key, char **val, int separator) |
PetscErrorCode | ScreenOutputTab (char *key, char *val) |
PetscErrorCode | ScreenOutputTabLine (char *key, char *val) |
PetscErrorCode | ReportEnabledPreprocessors (char *name) |
PetscErrorCode | ReportSysProCallStackState (char *name) |
Variables | |
int | npreprocess |
int | preprocesslevel |
static int | preprocessreadout |
SystemPreprocessor * | preprocessors |
#define LINELEN 1500 |
#define MAXLEN 500 |
Referenced by ScreenOutputTabLine().
#define REPOSITION | ( | a, | |||
b | ) |
PetscErrorCode ContinueRetrievingAllPreprocessors | ( | char ** | cclass, | |
char *** | types, | |||
int * | ntypes, | |||
PetscTruth * | success | |||
) |
This routine is to be used repeatedly after an initial call to StartRetrievingAllPreprocessors().
The types
argument is allocated internally and should be deallocated by the user.
Definition at line 186 of file reporting.c.
References CHKERRQ(), ierr, SalsaTransform_::n_objects, SystemPreprocessor_::name, npreprocess, preprocessreadout, SystemPreprocessor_::transform, and TransformObjectsGetNames().
Referenced by RetrieveAllPreprocessorValues(), StartRetrievingAllPreprocessors(), and TabReportPreprocessors().
PetscErrorCode ContinueRetrievingCurrentPreprocessors | ( | char ** | cclass, | |
char ** | type, | |||
int * | opt, | |||
PetscTruth * | success | |||
) |
This routine is to be used repeatedly after an initial call to StartRetrievingCurrentPreprocessors().
Definition at line 125 of file reporting.c.
References CHKERRQ(), ierr, SystemPreprocessor_::name, preprocesslevel, preprocessreadout, and RetrievePreprocessorChoice().
Referenced by StartRetrievingCurrentPreprocessors(), and TabReportPreprocessors().
PetscErrorCode GetFirstPreprocessor | ( | char ** | preprocess | ) |
Get the name of the first declared preprocessor (in order of declaration) or null if none have been declared. Subsequent preprocessors can be retrieved with GetNextPreprocessor() or SuccessorPreprocessor().
Definition at line 45 of file reporting.c.
References CHKERRQ(), GetNextPreprocessor(), ierr, and preprocessreadout.
Referenced by PreprocessedProblemSolving(), and PreprocessorsOptionsHandling().
PetscErrorCode GetNextPreprocessor | ( | char ** | next_one | ) |
Get the next preprocessor according to the variable preprocessreadout.
The result is null if there are no further preprocessors.
Definition at line 61 of file reporting.c.
References SystemPreprocessor_::name, npreprocess, and preprocessreadout.
Referenced by GetFirstPreprocessor(), and PreprocessorsOptionsHandling().
PetscErrorCode InitRetrievingPreprocessors | ( | ) |
Definition at line 169 of file reporting.c.
References preprocessreadout.
Referenced by TabReportPreprocessors().
PetscErrorCode ReportEnabledPreprocessors | ( | char * | name | ) |
Report preprocessor choices that are available after the specific setup has possible disabled some of the registered ones. This function uses the sysprotrace
function, so this has to have been declared.
Definition at line 387 of file reporting.c.
References CHKERRQ(), ierr, SysProHasTrace(), SysProTraceMessage(), TransformGetByName(), and TransformReportEnabled().
Referenced by PreprocessorsOptionsHandling(), and PreprocessorSpecificSetup().
PetscErrorCode ReportSysProCallStackState | ( | char * | name | ) |
Report preprocessor choices that are available after the specific setup has possible disabled some of the registered ones. This function uses the sysprotrace
function, so this has to have been declared.
Definition at line 411 of file reporting.c.
References CHKERRQ(), ierr, ScreenOutputTabLine(), SysProHasTrace(), SysProTraceMessage(), and TabReportPreprocessors().
Referenced by PreprocessedSolution().
PetscErrorCode RetrieveAllPreprocessorValues | ( | char * | cclass, | |
char *** | types, | |||
int * | ntypes | |||
) |
Definition at line 210 of file reporting.c.
References CHKERRQ(), ContinueRetrievingAllPreprocessors(), ierr, npreprocess, and preprocessreadout.
Referenced by pcoptionshandling().
PetscErrorCode ScreenOutputTab | ( | char * | key, | |
char * | val | |||
) |
Definition at line 320 of file reporting.c.
References CHKERRQ(), ierr, SysProHasTrace(), and SysProTraceMessage().
PetscErrorCode ScreenOutputTabLine | ( | char * | key, | |
char * | val | |||
) |
Definition at line 347 of file reporting.c.
References CHKERRQ(), ierr, MAXLEN, SysProHasTrace(), and SysProTraceMessage().
Referenced by ReportSysProCallStackState().
PetscErrorCode StartRetrievingAllPreprocessors | ( | char ** | cclass, | |
char *** | types, | |||
int * | ntypes, | |||
PetscTruth * | success | |||
) |
This routine gives the class of the first declared preprocessor, and all possible values. To get the next preprocessor, call ContinueRetrievingAllPreprocessors().
The class, types, and ntypes arguments can all be null.
The types
argument is allocated internally and should be deallocated by the user.
Definition at line 157 of file reporting.c.
References CHKERRQ(), ContinueRetrievingAllPreprocessors(), ierr, and preprocessreadout.
PetscErrorCode StartRetrievingCurrentPreprocessors | ( | char ** | cclass, | |
char ** | type, | |||
int * | opt, | |||
PetscTruth * | success | |||
) |
This routine gives the class and current value of the first declared preprocessor. To get the next preprocessor, call ContinueRetrievingAllPreprocessors().
The class, types, and ntypes arguments can all be null.
Definition at line 108 of file reporting.c.
References CHKERRQ(), ContinueRetrievingCurrentPreprocessors(), ierr, and preprocessreadout.
PetscErrorCode SuccessorPreprocessor | ( | char * | this_one, | |
char ** | next_one | |||
) |
Given a preprocessor, get the name of the next one (in order of declaration) or null if there are no further ones.
The arguments are allowed to be the same.
Definition at line 78 of file reporting.c.
References CHKERRQ(), ierr, SystemPreprocessor_::name, and npreprocess.
Referenced by PreprocessedSolution().
PetscErrorCode TabReportActivePreprocessors | ( | char ** | key, | |
char ** | val, | |||
int | separator | |||
) |
Definition at line 309 of file reporting.c.
References CHKERRQ(), ierr, and TabReportPreprocessors().
PetscErrorCode TabReportAllPreprocessors | ( | char ** | key, | |
int | separator | |||
) |
Definition at line 295 of file reporting.c.
References CHKERRQ(), ierr, and TabReportPreprocessors().
static PetscErrorCode TabReportPreprocessors | ( | PetscTruth | active, | |
char ** | key, | |||
char ** | val, | |||
int | separator | |||
) | [static] |
Report all defined preprocessors. Either key and val argument can be NULL. The string arguments returned need to be deallocated in the calling environment.
Definition at line 237 of file reporting.c.
References CHKERRQ(), ContinueRetrievingAllPreprocessors(), ContinueRetrievingCurrentPreprocessors(), ierr, InitRetrievingPreprocessors(), LINELEN, and REPOSITION.
Referenced by ReportSysProCallStackState(), TabReportActivePreprocessors(), and TabReportAllPreprocessors().
int npreprocess |
Definition at line 153 of file preprocess.c.
Referenced by ContinueRetrievingAllPreprocessors(), DeclarePreprocessor(), GetNextPreprocessor(), PreprocessorGetIndex(), RetrieveAllPreprocessorValues(), SuccessorPreprocessor(), and SysProFinalize().
int preprocesslevel |
Definition at line 153 of file preprocess.c.
Referenced by ContinueRetrievingCurrentPreprocessors(), PreprocessedProblemSolving(), PreprocessedSolution(), PreprocessorGetSetting(), and RegisterPreprocessorSetting().
Definition at line 150 of file preprocess.c.
int preprocessreadout [static] |
Definition at line 34 of file reporting.c.
Referenced by ContinueRetrievingAllPreprocessors(), ContinueRetrievingCurrentPreprocessors(), GetFirstPreprocessor(), GetNextPreprocessor(), InitRetrievingPreprocessors(), RetrieveAllPreprocessorValues(), StartRetrievingAllPreprocessors(), and StartRetrievingCurrentPreprocessors().