1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-28 06:43:01 +04:00

Merge pull request #12310 from cv3d:chunks/enum_interface

* Cleanup macros and enable expansion of `__VA_ARGS__` for Visual Studio

* Macros for enum-arguments backwards compatibility

* Convert struct Param to enum struct

* Enabled ParamType.type for enum types

* Enabled `cv.read` and `cv.write` for enum types

* Rename unnamed enum to AAKAZE.DescriptorType

* Rename unnamed enum to AccessFlag

* Rename unnamed enum to AgastFeatureDetector.DetectorType

* Convert struct DrawMatchesFlags to enum struct

* Rename unnamed enum to FastFeatureDetector.DetectorType

* Rename unnamed enum to Formatter.FormatType

* Rename unnamed enum to HOGDescriptor.HistogramNormType

* Rename unnamed enum to DescriptorMatcher.MatcherType

* Rename unnamed enum to KAZE.DiffusivityType

* Rename unnamed enum to ORB.ScoreType

* Rename unnamed enum to UMatData.MemoryFlag

* Rename unnamed enum to _InputArray.KindFlag

* Rename unnamed enum to _OutputArray.DepthMask

* Convert normType enums to static const NormTypes

* Avoid conflicts with ElemType

* Rename unnamed enum to DescriptorStorageFormat
This commit is contained in:
Hamdi Sahloul
2018-09-22 00:12:35 +09:00
committed by Alexander Alekhin
parent 84ae8097b1
commit ef5579dc86
51 changed files with 567 additions and 333 deletions
+4 -4
View File
@@ -53,7 +53,7 @@ struct CommandLineParser::Impl
};
static const char* get_type_name(int type)
static const char* get_type_name(Param type)
{
if( type == Param::INT )
return "int";
@@ -81,7 +81,7 @@ static bool parse_bool(std::string str)
return b;
}
static void from_str(const String& str, int type, void* dst)
static void from_str(const String& str, Param type, void* dst)
{
std::stringstream ss(str.c_str());
if( type == Param::INT )
@@ -117,7 +117,7 @@ static void from_str(const String& str, int type, void* dst)
}
}
void CommandLineParser::getByName(const String& name, bool space_delete, int type, void* dst) const
void CommandLineParser::getByName(const String& name, bool space_delete, Param type, void* dst) const
{
CV_TRY
{
@@ -154,7 +154,7 @@ void CommandLineParser::getByName(const String& name, bool space_delete, int typ
}
void CommandLineParser::getByIndex(int index, bool space_delete, int type, void* dst) const
void CommandLineParser::getByIndex(int index, bool space_delete, Param type, void* dst) const
{
CV_TRY
{