Skip to content

Commit

Permalink
Per #2168, define a beta version library function to warn users about…
Browse files Browse the repository at this point in the history
… new/incomplete features.
  • Loading branch information
JohnHalleyGotway committed Jun 2, 2023
1 parent a2538fc commit dfa8ae1
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 10 deletions.
20 changes: 20 additions & 0 deletions src/basic/vx_util/string_fxns.cc
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,26 @@ using namespace std;
////////////////////////////////////////////////////////////////////////


void print_beta_warning(const char * description,
const char * method_name) {

//
// Print standard warning message
//
ConcatString cs;
if(method_name) cs << method_name << " -> ";
if(description) cs << description << " ";
cs << "is provided in BETA status for MET " << met_version << ".\n";
cs << "Please see future MET version release notes for updates.";
mlog << Warning << "\n" << cs << "\n\n";

return;
}


////////////////////////////////////////////////////////////////////////


bool match_met_version(const char * check_version) {

//
Expand Down
12 changes: 2 additions & 10 deletions src/basic/vx_util/string_fxns.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,19 @@
// ** P.O.Box 3000, Boulder, Colorado, 80307-3000, USA
// *=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*



////////////////////////////////////////////////////////////////////////


#ifndef __STRING_FXNS_H__
#define __STRING_FXNS_H__


////////////////////////////////////////////////////////////////////////


#include "concat_string.h"


////////////////////////////////////////////////////////////////////////

extern void print_beta_warning(const char *description,
const char *method_name=nullptr);

extern bool match_met_version(const char *);

Expand Down Expand Up @@ -61,10 +57,6 @@ extern int parse_thresh_index(const char *str);

////////////////////////////////////////////////////////////////////////


#endif // __STRING_FXNS_H__


////////////////////////////////////////////////////////////////////////


0 comments on commit dfa8ae1

Please sign in to comment.