Skip to content

Commit

Permalink
Aos 2 metadata traits decorators efif (#8592)
Browse files Browse the repository at this point in the history
## Summary of Changes

Introduces two traits decorators, namely `Arr_tracing_traits_2` and
`Arr_counting_traits_2`, which can be used to extract debugging and
informative metadata about the traits in use while the program is being
executed. They have been part of the CGAL distribution for several years
now . (Probably more than a decade.) I gave it a face lift, wrote the
necessary documentation, and added a small example program called
count_and_trace.cpp.

## Release Management

* Affected package(s): 2D Arrangements (Arrangement_on_surface_2)
* Issue(s) solved (if any): NA
* Feature/Small Feature (if any): Aos 2 Metadata Traits Decorators --
**Pre-approval date 2024/11/12**
* Link to compiled documentation (obligatory for small feature)
[Manual](https://www.cs.tau.ac.il/~efif/doc_output9/Arrangement_on_surface_2/)
* License and copyright ownership: TAU
  • Loading branch information
sloriot authored Dec 4, 2024
2 parents 2f789b6 + de60668 commit ca8898c
Show file tree
Hide file tree
Showing 108 changed files with 6,180 additions and 5,977 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ void validate(std::any & v, const std::vector<std::string> & values,
Option_parser::my_validate<Option_parser::Strategy_id>(v, values);
}

/*! Constructor */
/*! constructs */
Option_parser::Option_parser() :
m_generic_opts("Generic options"),
m_config_opts("Configuration options"),
Expand Down Expand Up @@ -136,7 +136,7 @@ Option_parser::Option_parser() :
m_positional_opts.add("input-file", -1);
}

/*! Parse the options */
/*! parses the options */
void Option_parser::operator()(int argc, char * argv[])
{
po::store(po::command_line_parser(argc, argv).
Expand Down Expand Up @@ -225,20 +225,20 @@ void Option_parser::operator()(int argc, char * argv[])
}
}

/*! Obtain the base file-name */
/*! obtains the base file-name */
const std::string & Option_parser::get_file_name(unsigned int i) const
{
return m_variable_map["input-file"].as<Input_path>()[i];
}

/*! Obtain the full file-name */
/*! obtains the full file-name */
const std::string & Option_parser::get_full_name(unsigned int i) const
{ return m_full_names[i]; }

/*! Obtain number of type options */
/*! obtains number of type options */
unsigned int Option_parser::get_number_opts(Type_id &)
{ return sizeof(s_type_opts) / sizeof(char *); }

/*! Obtain number of strategy options */
/*! obtains number of strategy options */
unsigned int Option_parser::get_number_opts(Strategy_id &)
{ return sizeof(s_strategy_opts) / sizeof(char *); }
Original file line number Diff line number Diff line change
Expand Up @@ -62,17 +62,17 @@ class Option_parser : public cb::Option_parser {
typedef Vector_strategy_id::iterator Vector_strategy_id_iter;

public:
/*! \brief obtains number of type options */
/*! obtains number of type options */
static unsigned int get_number_opts(Type_id &);

/*! \brief obtains number of strategy options */
/*! obtains number of strategy options */
static unsigned int get_number_opts(Strategy_id &);

/*! Compare the i-th type option to a given option */
/*! compares the i-th type option to a given option */
static bool compare_opt(unsigned int i, const char * opt, Type_id &)
{ return strcmp(s_type_opts[i], opt) == 0; }

/*! Compare the i-th strategy option to a given option */
/*! compares the i-th strategy option to a given option */
static bool compare_opt(unsigned int i, const char * opt, Strategy_id &)
{ return strcmp(s_strategy_opts[i], opt) == 0; }

Expand All @@ -94,19 +94,19 @@ class Option_parser : public cb::Option_parser {
Input_file_missing_error(std::string & str) : error(str) {}
};

/*! Parse the options */
/*! parses the options */
void operator()(int argc, char * argv[]);

/*! Obtain the verbosity level */
/*! obtains the verbosity level */
unsigned int get_verbose_level() const { return m_verbose_level; }

/*! Obtain the number of input files */
/*! obtains the number of input files */
unsigned int get_number_files() const { return m_number_files; }

/*! \brief obtains the base file-name */
/*! obtains the base file-name */
const std::string & get_file_name(unsigned int i) const;

/*! \brief obtains the full file-name */
/*! obtains the full file-name */
const std::string & get_full_name(unsigned int i) const;

bool get_postscript() const { return m_postscript; }
Expand All @@ -117,10 +117,10 @@ class Option_parser : public cb::Option_parser {
const char * get_strategy_name(Strategy_code id) const
{ return s_strategy_opts[id]; }

/*! Obtain the window width */
/*! obtains the window width */
unsigned int get_width() const { return m_win_width; }

/*! Obtain the window height */
/*! obtains the window height */
unsigned int get_height() const { return m_win_height; }

template <class MyId>
Expand Down

Large diffs are not rendered by default.

Loading

0 comments on commit ca8898c

Please sign in to comment.