Formatting and comments

This commit is contained in:
shahramn 2024-10-23 10:17:16 +01:00
parent f769c768b7
commit bafbb1b300
69 changed files with 26 additions and 97 deletions

View File

@ -17,10 +17,14 @@ class grib_accessor
{ {
public: public:
grib_accessor() : grib_accessor() :
context_(nullptr), name_(nullptr), class_name_(nullptr), name_space_(nullptr), h_(nullptr), creator_(nullptr), length_(0), offset_(0), parent_(nullptr), next_(nullptr), previous_(nullptr), flags_(0), sub_section_(nullptr), dirty_(0), same_(nullptr), loop_(0), vvalue_(nullptr), set_(nullptr), parent_as_attribute_(nullptr) {} context_(nullptr), name_(nullptr), class_name_(nullptr), name_space_(nullptr), h_(nullptr),
creator_(nullptr), length_(0), offset_(0), parent_(nullptr), next_(nullptr), previous_(nullptr),
flags_(0), sub_section_(nullptr), dirty_(0), same_(nullptr), loop_(0), vvalue_(nullptr), set_(nullptr), parent_as_attribute_(nullptr) {}
grib_accessor(const char* name) : grib_accessor(const char* name) :
context_(nullptr), name_(name), class_name_(nullptr), name_space_(nullptr), h_(nullptr), creator_(nullptr), length_(0), offset_(0), parent_(nullptr), next_(nullptr), previous_(nullptr), flags_(0), sub_section_(nullptr), dirty_(0), same_(nullptr), loop_(0), vvalue_(nullptr), set_(nullptr), parent_as_attribute_(nullptr) {} context_(nullptr), name_(name), class_name_(nullptr), name_space_(nullptr), h_(nullptr),
creator_(nullptr), length_(0), offset_(0), parent_(nullptr), next_(nullptr), previous_(nullptr),
flags_(0), sub_section_(nullptr), dirty_(0), same_(nullptr), loop_(0), vvalue_(nullptr), set_(nullptr), parent_as_attribute_(nullptr) {}
virtual ~grib_accessor() {} virtual ~grib_accessor() {}
virtual void init_accessor(const long, grib_arguments*) = 0; virtual void init_accessor(const long, grib_arguments*) = 0;
@ -79,33 +83,27 @@ public:
public: public:
// TODO(maee): make private // TODO(maee): make private
grib_context* context_ = nullptr; grib_context* context_ = nullptr;
const char* name_ = nullptr; /** < name of the accessor */ const char* name_ = nullptr; // name of the accessor
const char* class_name_ = nullptr; /** < name of the class (Artifact from C version of ecCodes) */ const char* class_name_ = nullptr; // name of the class (Artifact from C version of ecCodes)
const char* name_space_ = nullptr; /** < namespace to which the accessor belongs */ const char* name_space_ = nullptr; // namespace to which the accessor belongs
grib_handle* h_ = nullptr; grib_handle* h_ = nullptr;
grib_action* creator_ = nullptr; /** < action that created the accessor */ grib_action* creator_ = nullptr; // action that created the accessor
long length_ = 0; /** < byte length of the accessor */ long length_ = 0; // byte length of the accessor
long offset_ = 0; /** < offset of the data in the buffer */ long offset_ = 0; // offset of the data in the buffer
grib_section* parent_ = nullptr; /** < section to which the accessor is attached */ grib_section* parent_ = nullptr; // section to which the accessor is attached
grib_accessor* next_ = nullptr; /** < next accessor in list */ grib_accessor* next_ = nullptr; // next accessor in list
grib_accessor* previous_ = nullptr; /** < next accessor in list */ grib_accessor* previous_ = nullptr; // next accessor in list
unsigned long flags_ = 0; /** < Various flags */ unsigned long flags_ = 0; // Various flags
grib_section* sub_section_ = nullptr; grib_section* sub_section_ = nullptr;
const char* all_names_[MAX_ACCESSOR_NAMES] = { const char* all_names_[MAX_ACCESSOR_NAMES] = {0,}; // name of the accessor
0, const char* all_name_spaces_[MAX_ACCESSOR_NAMES] = {0,}; // namespace to which the accessor belongs
}; /** < name of the accessor */
const char* all_name_spaces_[MAX_ACCESSOR_NAMES] = {
0,
}; /** < namespace to which the accessor belongs */
int dirty_ = 0; int dirty_ = 0;
grib_accessor* same_ = nullptr; /** < accessors with the same name */ grib_accessor* same_ = nullptr; // accessors with the same name
long loop_ = 0; /** < used in lists */ long loop_ = 0; // used in lists
grib_virtual_value* vvalue_ = nullptr; /** < virtual value used when transient flag on **/ grib_virtual_value* vvalue_ = nullptr; // virtual value used when transient flag on
const char* set_ = nullptr; const char* set_ = nullptr;
grib_accessor* attributes_[MAX_ACCESSOR_ATTRIBUTES] = { grib_accessor* attributes_[MAX_ACCESSOR_ATTRIBUTES] = {0,}; // attributes are accessors
0,
}; /** < attributes are accessors */
grib_accessor* parent_as_attribute_ = nullptr; grib_accessor* parent_as_attribute_ = nullptr;
}; };

View File

@ -23,6 +23,5 @@ public:
void init(const long, grib_arguments*) override; void init(const long, grib_arguments*) override;
private: private:
/* Members defined in cf_var_name */
const char* defaultKey_ = nullptr; const char* defaultKey_ = nullptr;
}; };

View File

@ -1,4 +1,3 @@
/* /*
* (C) Copyright 2005- ECMWF. * (C) Copyright 2005- ECMWF.
* *

View File

@ -1,4 +1,3 @@
/* /*
* (C) Copyright 2005- ECMWF. * (C) Copyright 2005- ECMWF.
* *

View File

@ -1,4 +1,3 @@
/* /*
* (C) Copyright 2005- ECMWF. * (C) Copyright 2005- ECMWF.
* *

View File

@ -1,4 +1,3 @@
/* /*
* (C) Copyright 2005- ECMWF. * (C) Copyright 2005- ECMWF.
* *

View File

@ -1,4 +1,3 @@
/* /*
* (C) Copyright 2005- ECMWF. * (C) Copyright 2005- ECMWF.
* *

View File

@ -1,4 +1,3 @@
/* /*
* (C) Copyright 2005- ECMWF. * (C) Copyright 2005- ECMWF.
* *

View File

@ -1,4 +1,3 @@
/* /*
* (C) Copyright 2005- ECMWF. * (C) Copyright 2005- ECMWF.
* *

View File

@ -1,4 +1,3 @@
/* /*
* (C) Copyright 2005- ECMWF. * (C) Copyright 2005- ECMWF.
* *

View File

@ -1,4 +1,3 @@
/* /*
* (C) Copyright 2005- ECMWF. * (C) Copyright 2005- ECMWF.
* *

View File

@ -1,4 +1,3 @@
/* /*
* (C) Copyright 2005- ECMWF. * (C) Copyright 2005- ECMWF.
* *

View File

@ -1,4 +1,3 @@
/* /*
* (C) Copyright 2005- ECMWF. * (C) Copyright 2005- ECMWF.
* *

View File

@ -1,4 +1,3 @@
/* /*
* (C) Copyright 2005- ECMWF. * (C) Copyright 2005- ECMWF.
* *

View File

@ -1,4 +1,3 @@
/* /*
* (C) Copyright 2005- ECMWF. * (C) Copyright 2005- ECMWF.
* *

View File

@ -1,4 +1,3 @@
/* /*
* (C) Copyright 2005- ECMWF. * (C) Copyright 2005- ECMWF.
* *

View File

@ -1,4 +1,3 @@
/* /*
* (C) Copyright 2005- ECMWF. * (C) Copyright 2005- ECMWF.
* *

View File

@ -1,4 +1,3 @@
/* /*
* (C) Copyright 2005- ECMWF. * (C) Copyright 2005- ECMWF.
* *

View File

@ -1,4 +1,3 @@
/* /*
* (C) Copyright 2005- ECMWF. * (C) Copyright 2005- ECMWF.
* *

View File

@ -1,4 +1,3 @@
/* /*
* (C) Copyright 2005- ECMWF. * (C) Copyright 2005- ECMWF.
* *

View File

@ -1,4 +1,3 @@
/* /*
* (C) Copyright 2005- ECMWF. * (C) Copyright 2005- ECMWF.
* *

View File

@ -1,4 +1,3 @@
/* /*
* (C) Copyright 2005- ECMWF. * (C) Copyright 2005- ECMWF.
* *

View File

@ -1,4 +1,3 @@
/* /*
* (C) Copyright 2005- ECMWF. * (C) Copyright 2005- ECMWF.
* *

View File

@ -1,4 +1,3 @@
/* /*
* (C) Copyright 2005- ECMWF. * (C) Copyright 2005- ECMWF.
* *

View File

@ -1,4 +1,3 @@
/* /*
* (C) Copyright 2005- ECMWF. * (C) Copyright 2005- ECMWF.
* *

View File

@ -1,4 +1,3 @@
/* /*
* (C) Copyright 2005- ECMWF. * (C) Copyright 2005- ECMWF.
* *

View File

@ -1,4 +1,3 @@
/* /*
* (C) Copyright 2005- ECMWF. * (C) Copyright 2005- ECMWF.
* *

View File

@ -1,4 +1,3 @@
/* /*
* (C) Copyright 2005- ECMWF. * (C) Copyright 2005- ECMWF.
* *

View File

@ -1,4 +1,3 @@
/* /*
* (C) Copyright 2005- ECMWF. * (C) Copyright 2005- ECMWF.
* *

View File

@ -1,4 +1,3 @@
/* /*
* (C) Copyright 2005- ECMWF. * (C) Copyright 2005- ECMWF.
* *

View File

@ -1,4 +1,3 @@
/* /*
* (C) Copyright 2005- ECMWF. * (C) Copyright 2005- ECMWF.
* *

View File

@ -1,4 +1,3 @@
/* /*
* (C) Copyright 2005- ECMWF. * (C) Copyright 2005- ECMWF.
* *

View File

@ -1,4 +1,3 @@
/* /*
* (C) Copyright 2005- ECMWF. * (C) Copyright 2005- ECMWF.
* *

View File

@ -1,4 +1,3 @@
/* /*
* (C) Copyright 2005- ECMWF. * (C) Copyright 2005- ECMWF.
* *

View File

@ -1,4 +1,3 @@
/* /*
* (C) Copyright 2005- ECMWF. * (C) Copyright 2005- ECMWF.
* *

View File

@ -1,4 +1,3 @@
/* /*
* (C) Copyright 2005- ECMWF. * (C) Copyright 2005- ECMWF.
* *

View File

@ -1,4 +1,3 @@
/* /*
* (C) Copyright 2005- ECMWF. * (C) Copyright 2005- ECMWF.
* *

View File

@ -1,4 +1,3 @@
/* /*
* (C) Copyright 2005- ECMWF. * (C) Copyright 2005- ECMWF.
* *

View File

@ -1,4 +1,3 @@
/* /*
* (C) Copyright 2005- ECMWF. * (C) Copyright 2005- ECMWF.
* *

View File

@ -1,4 +1,3 @@
/* /*
* (C) Copyright 2005- ECMWF. * (C) Copyright 2005- ECMWF.
* *

View File

@ -1,4 +1,3 @@
/* /*
* (C) Copyright 2005- ECMWF. * (C) Copyright 2005- ECMWF.
* *

View File

@ -1,4 +1,3 @@
/* /*
* (C) Copyright 2005- ECMWF. * (C) Copyright 2005- ECMWF.
* *

View File

@ -1,4 +1,3 @@
/* /*
* (C) Copyright 2005- ECMWF. * (C) Copyright 2005- ECMWF.
* *

View File

@ -1,4 +1,3 @@
/* /*
* (C) Copyright 2005- ECMWF. * (C) Copyright 2005- ECMWF.
* *

View File

@ -1,4 +1,3 @@
/* /*
* (C) Copyright 2005- ECMWF. * (C) Copyright 2005- ECMWF.
* *

View File

@ -1,4 +1,3 @@
/* /*
* (C) Copyright 2005- ECMWF. * (C) Copyright 2005- ECMWF.
* *

View File

@ -1,4 +1,3 @@
/* /*
* (C) Copyright 2005- ECMWF. * (C) Copyright 2005- ECMWF.
* *

View File

@ -1,4 +1,3 @@
/* /*
* (C) Copyright 2005- ECMWF. * (C) Copyright 2005- ECMWF.
* *

View File

@ -1,4 +1,3 @@
/* /*
* (C) Copyright 2005- ECMWF. * (C) Copyright 2005- ECMWF.
* *

View File

@ -1,4 +1,3 @@
/* /*
* (C) Copyright 2005- ECMWF. * (C) Copyright 2005- ECMWF.
* *

View File

@ -1,4 +1,3 @@
/* /*
* (C) Copyright 2005- ECMWF. * (C) Copyright 2005- ECMWF.
* *

View File

@ -1,4 +1,3 @@
/* /*
* (C) Copyright 2005- ECMWF. * (C) Copyright 2005- ECMWF.
* *

View File

@ -1,4 +1,3 @@
/* /*
* (C) Copyright 2005- ECMWF. * (C) Copyright 2005- ECMWF.
* *

View File

@ -1,4 +1,3 @@
/* /*
* (C) Copyright 2005- ECMWF. * (C) Copyright 2005- ECMWF.
* *

View File

@ -1,4 +1,3 @@
/* /*
* (C) Copyright 2005- ECMWF. * (C) Copyright 2005- ECMWF.
* *

View File

@ -1,4 +1,3 @@
/* /*
* (C) Copyright 2005- ECMWF. * (C) Copyright 2005- ECMWF.
* *

View File

@ -1,4 +1,3 @@
/* /*
* (C) Copyright 2005- ECMWF. * (C) Copyright 2005- ECMWF.
* *

View File

@ -1,4 +1,3 @@
/* /*
* (C) Copyright 2005- ECMWF. * (C) Copyright 2005- ECMWF.
* *

View File

@ -1,4 +1,3 @@
/* /*
* (C) Copyright 2005- ECMWF. * (C) Copyright 2005- ECMWF.
* *

View File

@ -1,4 +1,3 @@
/* /*
* (C) Copyright 2005- ECMWF. * (C) Copyright 2005- ECMWF.
* *

View File

@ -1,4 +1,3 @@
/* /*
* (C) Copyright 2005- ECMWF. * (C) Copyright 2005- ECMWF.
* *

View File

@ -1,4 +1,3 @@
/* /*
* (C) Copyright 2005- ECMWF. * (C) Copyright 2005- ECMWF.
* *

View File

@ -1,4 +1,3 @@
/* /*
* (C) Copyright 2005- ECMWF. * (C) Copyright 2005- ECMWF.
* *

View File

@ -1,4 +1,3 @@
/* /*
* (C) Copyright 2005- ECMWF. * (C) Copyright 2005- ECMWF.
* *

View File

@ -1,4 +1,3 @@
/* /*
* (C) Copyright 2005- ECMWF. * (C) Copyright 2005- ECMWF.
* *

View File

@ -1,4 +1,3 @@
/* /*
* (C) Copyright 2005- ECMWF. * (C) Copyright 2005- ECMWF.
* *

View File

@ -1,4 +1,3 @@
/* /*
* (C) Copyright 2005- ECMWF. * (C) Copyright 2005- ECMWF.
* *

View File

@ -1,4 +1,3 @@
/* /*
* (C) Copyright 2005- ECMWF. * (C) Copyright 2005- ECMWF.
* *

View File

@ -12,9 +12,7 @@
#include "grib_api_internal.h" #include "grib_api_internal.h"
/*! Grib geoiterator, structure supporting a geographic iteration of values on a GRIB message. // GRIB geoiterator, class supporting geographic iteration of values on a GRIB message
\ingroup grib_iterator
*/
namespace eccodes::geo_iterator { namespace eccodes::geo_iterator {
@ -34,9 +32,9 @@ public:
protected: protected:
grib_handle* h_ = nullptr; grib_handle* h_ = nullptr;
double* data_ = nullptr; /** data values */ double* data_ = nullptr; // data values
mutable long e_ = 0; /** current element */ mutable long e_ = 0; // current element
size_t nv_ = 0; /** number of values */ size_t nv_ = 0; // number of values
const char* class_name_ = nullptr; const char* class_name_ = nullptr;
}; };