Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doxygen rtd integration [second attempt] #574

Merged
merged 3 commits into from
Mar 17, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@
_build
*.pt
*.vscode*
.DS_Store
generated_rtd*
147 changes: 79 additions & 68 deletions core/teca_algorithm_fwd.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ std::shared_ptr<T const> shared_from_this() const \
}

#define TECA_ALGORITHM_CLASS_NAME(T) \
/** returns the name of the class */ \
const char *get_class_name() const override \
{ \
return #T; \
Expand All @@ -50,20 +51,22 @@ const char *get_class_name() const override \
// convenience macro to declare standard set_NAME/get_NAME methods
// where NAME is the name of a class member. will manage the
// algorithm's modified state for the user.
#define TECA_ALGORITHM_PROPERTY(T, NAME) \
\
void set_##NAME(const T &v) \
{ \
if (this->NAME != v) \
{ \
this->NAME = v; \
this->set_modified(); \
} \
} \
\
const T &get_##NAME() const \
{ \
return this->NAME; \
#define TECA_ALGORITHM_PROPERTY(T, NAME) \
\
/** Set the value of the @ref NAME algorithm property */ \
void set_##NAME(const T &v) \
{ \
if (this->NAME != v) \
{ \
this->NAME = v; \
this->set_modified(); \
} \
} \
\
/** Get the value of the @ref NAME algorithm property */ \
const T &get_##NAME() const \
{ \
return this->NAME; \
}

// similar to TECA_ALGORITHM_PROPERTY but prior to setting NAME
Expand Down Expand Up @@ -93,60 +96,68 @@ const T &get_##NAME() const \
// convenience macro to declare standard set_NAME/get_NAME methods
// where NAME is the name of a class member. will manage the
// algorithm's modified state for the user.
#define TECA_ALGORITHM_VECTOR_PROPERTY(T, NAME) \
\
size_t get_number_of_##NAME##s () \
{ \
return this->NAME##s.size(); \
} \
\
void append_##NAME(const T &v) \
{ \
this->NAME##s.push_back(v); \
this->set_modified(); \
} \
\
void set_##NAME(size_t i, const T &v) \
{ \
if (this->NAME##s[i] != v) \
{ \
this->NAME##s[i] = v; \
this->set_modified(); \
} \
} \
\
void set_##NAME##s(const std::vector<T> &v) \
{ \
if (this->NAME##s != v) \
{ \
this->NAME##s = v; \
this->set_modified(); \
} \
} \
\
void set_##NAME##s(const std::initializer_list<T> &&l) \
{ \
std::vector<T> v(l); \
if (this->NAME##s != v) \
{ \
this->NAME##s = v; \
this->set_modified(); \
} \
} \
\
const T &get_##NAME(size_t i) const \
{ \
return this->NAME##s[i]; \
} \
\
const std::vector<T> &get_##NAME##s() const \
{ \
return this->NAME##s; \
} \
\
void clear_##NAME##s() \
{ \
this->NAME##s.clear(); \
#define TECA_ALGORITHM_VECTOR_PROPERTY(T, NAME) \
\
/** get the size of the @ref NAME##s algorithm vector property */ \
size_t get_number_of_##NAME##s () \
{ \
return this->NAME##s.size(); \
} \
\
/** append to the @ref NAME##s algorithm vector property */ \
void append_##NAME(const T &v) \
{ \
this->NAME##s.push_back(v); \
this->set_modified(); \
} \
\
/** set the i-th element of the @ref NAME##s algorithm vector property */ \
void set_##NAME(size_t i, const T &v) \
{ \
if (this->NAME##s[i] != v) \
{ \
this->NAME##s[i] = v; \
this->set_modified(); \
} \
} \
\
/** set the @ref NAME##s algorithm vector property */ \
void set_##NAME##s(const std::vector<T> &v) \
{ \
if (this->NAME##s != v) \
{ \
this->NAME##s = v; \
this->set_modified(); \
} \
} \
\
/** set the @ref NAME##s algorithm vector property */ \
void set_##NAME##s(const std::initializer_list<T> &&l) \
{ \
std::vector<T> v(l); \
if (this->NAME##s != v) \
{ \
this->NAME##s = v; \
this->set_modified(); \
} \
} \
\
/** get the i-th element of the @ref NAME##s algorithm vector property */ \
const T &get_##NAME(size_t i) const \
{ \
return this->NAME##s[i]; \
} \
\
/** get the @ref NAME##s algorithm vector property */ \
const std::vector<T> &get_##NAME##s() const \
{ \
return this->NAME##s; \
} \
\
/** clear the @ref NAME##s algorithm vector property */ \
void clear_##NAME##s() \
{ \
this->NAME##s.clear(); \
}


Expand Down
Loading