Drop cv:: prefix from cv::String used inside the cv namespace

This commit is contained in:
Andrey Kamaev
2013-03-22 20:37:49 +04:00
parent 75513a46dc
commit be7bbe3aa9
122 changed files with 1077 additions and 1077 deletions

View File

@@ -125,7 +125,7 @@ public:
Full constructor. Normally the constuctor is not called explicitly.
Instead, the macros CV_Error(), CV_Error_() and CV_Assert() are used.
*/
Exception(int _code, const cv::String& _err, const cv::String& _func, const cv::String& _file, int _line);
Exception(int _code, const String& _err, const String& _func, const String& _file, int _line);
virtual ~Exception() throw();
/*!
@@ -134,12 +134,12 @@ public:
virtual const char *what() const throw();
void formatMessage();
cv::String msg; ///< the formatted error message
String msg; ///< the formatted error message
int code; ///< error code @see CVStatus
cv::String err; ///< error description
cv::String func; ///< function name. Available only when the compiler supports __func__ macro
cv::String file; ///< source file name where the error has occured
String err; ///< error description
String func; ///< function name. Available only when the compiler supports __func__ macro
String file; ///< source file name where the error has occured
int line; ///< line number in the source file where the error has occured
};
@@ -2514,13 +2514,13 @@ enum
};
//! renders text string in the image
CV_EXPORTS_W void putText( Mat& img, const cv::String& text, Point org,
CV_EXPORTS_W void putText( Mat& img, const String& text, Point org,
int fontFace, double fontScale, Scalar color,
int thickness=1, int lineType=8,
bool bottomLeftOrigin=false );
//! returns bounding box of the text string
CV_EXPORTS_W Size getTextSize(const cv::String& text, int fontFace,
CV_EXPORTS_W Size getTextSize(const String& text, int fontFace,
double fontScale, int thickness,
CV_OUT int* baseLine);
@@ -3765,7 +3765,7 @@ class CV_EXPORTS FileNode;
FileStorage fs("test.yml", FileStorage::READ);
int test_int = (int)fs["test_int"];
double test_real = (double)fs["test_real"];
cv::String test_string = (cv::String)fs["test_string"];
String test_string = (String)fs["test_string"];
Mat M;
fs["test_mat"] >> M;
@@ -3776,7 +3776,7 @@ class CV_EXPORTS FileNode;
int tl1 = (int)tl[1];
double tl2 = (double)tl[2];
int tl3 = (int)tl[3];
cv::String tl4 = (cv::String)tl[4];
String tl4 = (String)tl[4];
CV_Assert(tl[5].type() == FileNode::MAP && tl[5].size() == 3);
int month = (int)tl[5]["month"];
@@ -3822,27 +3822,27 @@ public:
//! the default constructor
CV_WRAP FileStorage();
//! the full constructor that opens file storage for reading or writing
CV_WRAP FileStorage(const cv::String& source, int flags, const cv::String& encoding=cv::String());
CV_WRAP FileStorage(const String& source, int flags, const String& encoding=String());
//! the constructor that takes pointer to the C FileStorage structure
FileStorage(CvFileStorage* fs);
//! the destructor. calls release()
virtual ~FileStorage();
//! opens file storage for reading or writing. The previous storage is closed with release()
CV_WRAP virtual bool open(const cv::String& filename, int flags, const cv::String& encoding=cv::String());
CV_WRAP virtual bool open(const String& filename, int flags, const String& encoding=String());
//! returns true if the object is associated with currently opened file.
CV_WRAP virtual bool isOpened() const;
//! closes the file and releases all the memory buffers
CV_WRAP virtual void release();
//! closes the file, releases all the memory buffers and returns the text string
CV_WRAP virtual cv::String releaseAndGetString();
CV_WRAP virtual String releaseAndGetString();
//! returns the first element of the top-level mapping
CV_WRAP FileNode getFirstTopLevelNode() const;
//! returns the top-level mapping. YAML supports multiple streams
CV_WRAP FileNode root(int streamidx=0) const;
//! returns the specified element of the top-level mapping
FileNode operator[](const cv::String& nodename) const;
FileNode operator[](const String& nodename) const;
//! returns the specified element of the top-level mapping
CV_WRAP FileNode operator[](const char* nodename) const;
@@ -3851,15 +3851,15 @@ public:
//! returns pointer to the underlying C FileStorage structure
const CvFileStorage* operator *() const { return fs; }
//! writes one or more numbers of the specified format to the currently written structure
void writeRaw( const cv::String& fmt, const uchar* vec, size_t len );
void writeRaw( const String& fmt, const uchar* vec, size_t len );
//! writes the registered C structure (CvMat, CvMatND, CvSeq). See cvWrite()
void writeObj( const cv::String& name, const void* obj );
void writeObj( const String& name, const void* obj );
//! returns the normalized object name for the specified file name
static cv::String getDefaultObjectName(const cv::String& filename);
static String getDefaultObjectName(const String& filename);
Ptr<CvFileStorage> fs; //!< the underlying C FileStorage structure
cv::String elname; //!< the currently written element
String elname; //!< the currently written element
std::vector<char> structs; //!< the stack of written structures
int state; //!< the writer state
};
@@ -3904,7 +3904,7 @@ public:
//! the copy constructor
FileNode(const FileNode& node);
//! returns element of a mapping node
FileNode operator[](const cv::String& nodename) const;
FileNode operator[](const String& nodename) const;
//! returns element of a mapping node
CV_WRAP FileNode operator[](const char* nodename) const;
//! returns element of a sequence node
@@ -3929,7 +3929,7 @@ public:
//! returns true if the node has a name
CV_WRAP bool isNamed() const;
//! returns the node name or an empty string if the node is nameless
CV_WRAP cv::String name() const;
CV_WRAP String name() const;
//! returns the number of elements in the node, if it is a sequence or mapping, or 1 otherwise.
CV_WRAP size_t size() const;
//! returns the node content as an integer. If the node stores floating-point number, it is rounded.
@@ -3955,7 +3955,7 @@ public:
FileNodeIterator end() const;
//! reads node elements to the buffer with the specified format
void readRaw( const cv::String& fmt, uchar* vec, size_t len ) const;
void readRaw( const String& fmt, uchar* vec, size_t len ) const;
//! reads the registered object and returns pointer to it
void* readObj() const;
@@ -3998,7 +3998,7 @@ public:
FileNodeIterator& operator -= (int ofs);
//! reads the next maxCount elements (or less, if the sequence/mapping last element occurs earlier) to the buffer with the specified format
FileNodeIterator& readRaw( const cv::String& fmt, uchar* vec,
FileNodeIterator& readRaw( const String& fmt, uchar* vec,
size_t maxCount=(size_t)INT_MAX );
const CvFileStorage* fs;
@@ -4154,41 +4154,41 @@ class CV_EXPORTS_W Algorithm
public:
Algorithm();
virtual ~Algorithm();
cv::String name() const;
String name() const;
template<typename _Tp> typename ParamType<_Tp>::member_type get(const cv::String& name) const;
template<typename _Tp> typename ParamType<_Tp>::member_type get(const String& name) const;
template<typename _Tp> typename ParamType<_Tp>::member_type get(const char* name) const;
CV_WRAP int getInt(const cv::String& name) const;
CV_WRAP double getDouble(const cv::String& name) const;
CV_WRAP bool getBool(const cv::String& name) const;
CV_WRAP cv::String getString(const cv::String& name) const;
CV_WRAP Mat getMat(const cv::String& name) const;
CV_WRAP std::vector<Mat> getMatVector(const cv::String& name) const;
CV_WRAP Ptr<Algorithm> getAlgorithm(const cv::String& name) const;
CV_WRAP int getInt(const String& name) const;
CV_WRAP double getDouble(const String& name) const;
CV_WRAP bool getBool(const String& name) const;
CV_WRAP String getString(const String& name) const;
CV_WRAP Mat getMat(const String& name) const;
CV_WRAP std::vector<Mat> getMatVector(const String& name) const;
CV_WRAP Ptr<Algorithm> getAlgorithm(const String& name) const;
void set(const cv::String& name, int value);
void set(const cv::String& name, double value);
void set(const cv::String& name, bool value);
void set(const cv::String& name, const cv::String& value);
void set(const cv::String& name, const Mat& value);
void set(const cv::String& name, const std::vector<Mat>& value);
void set(const cv::String& name, const Ptr<Algorithm>& value);
template<typename _Tp> void set(const cv::String& name, const Ptr<_Tp>& value);
void set(const String& name, int value);
void set(const String& name, double value);
void set(const String& name, bool value);
void set(const String& name, const String& value);
void set(const String& name, const Mat& value);
void set(const String& name, const std::vector<Mat>& value);
void set(const String& name, const Ptr<Algorithm>& value);
template<typename _Tp> void set(const String& name, const Ptr<_Tp>& value);
CV_WRAP void setInt(const cv::String& name, int value);
CV_WRAP void setDouble(const cv::String& name, double value);
CV_WRAP void setBool(const cv::String& name, bool value);
CV_WRAP void setString(const cv::String& name, const cv::String& value);
CV_WRAP void setMat(const cv::String& name, const Mat& value);
CV_WRAP void setMatVector(const cv::String& name, const std::vector<Mat>& value);
CV_WRAP void setAlgorithm(const cv::String& name, const Ptr<Algorithm>& value);
template<typename _Tp> void setAlgorithm(const cv::String& name, const Ptr<_Tp>& value);
CV_WRAP void setInt(const String& name, int value);
CV_WRAP void setDouble(const String& name, double value);
CV_WRAP void setBool(const String& name, bool value);
CV_WRAP void setString(const String& name, const String& value);
CV_WRAP void setMat(const String& name, const Mat& value);
CV_WRAP void setMatVector(const String& name, const std::vector<Mat>& value);
CV_WRAP void setAlgorithm(const String& name, const Ptr<Algorithm>& value);
template<typename _Tp> void setAlgorithm(const String& name, const Ptr<_Tp>& value);
void set(const char* name, int value);
void set(const char* name, double value);
void set(const char* name, bool value);
void set(const char* name, const cv::String& value);
void set(const char* name, const String& value);
void set(const char* name, const Mat& value);
void set(const char* name, const std::vector<Mat>& value);
void set(const char* name, const Ptr<Algorithm>& value);
@@ -4197,16 +4197,16 @@ public:
void setInt(const char* name, int value);
void setDouble(const char* name, double value);
void setBool(const char* name, bool value);
void setString(const char* name, const cv::String& value);
void setString(const char* name, const String& value);
void setMat(const char* name, const Mat& value);
void setMatVector(const char* name, const std::vector<Mat>& value);
void setAlgorithm(const char* name, const Ptr<Algorithm>& value);
template<typename _Tp> void setAlgorithm(const char* name, const Ptr<_Tp>& value);
CV_WRAP cv::String paramHelp(const cv::String& name) const;
CV_WRAP String paramHelp(const String& name) const;
int paramType(const char* name) const;
CV_WRAP int paramType(const cv::String& name) const;
CV_WRAP void getParams(CV_OUT std::vector<cv::String>& names) const;
CV_WRAP int paramType(const String& name) const;
CV_WRAP void getParams(CV_OUT std::vector<String>& names) const;
virtual void write(FileStorage& fs) const;
@@ -4216,9 +4216,9 @@ public:
typedef int (Algorithm::*Getter)() const;
typedef void (Algorithm::*Setter)(int);
CV_WRAP static void getList(CV_OUT std::vector<cv::String>& algorithms);
CV_WRAP static Ptr<Algorithm> _create(const cv::String& name);
template<typename _Tp> static Ptr<_Tp> create(const cv::String& name);
CV_WRAP static void getList(CV_OUT std::vector<String>& algorithms);
CV_WRAP static Ptr<Algorithm> _create(const String& name);
template<typename _Tp> static Ptr<_Tp> create(const String& name);
virtual AlgorithmInfo* info() const /* TODO: make it = 0;*/ { return 0; }
};
@@ -4228,86 +4228,86 @@ class CV_EXPORTS AlgorithmInfo
{
public:
friend class Algorithm;
AlgorithmInfo(const cv::String& name, Algorithm::Constructor create);
AlgorithmInfo(const String& name, Algorithm::Constructor create);
~AlgorithmInfo();
void get(const Algorithm* algo, const char* name, int argType, void* value) const;
void addParam_(Algorithm& algo, const char* name, int argType,
void* value, bool readOnly,
Algorithm::Getter getter, Algorithm::Setter setter,
const cv::String& help=cv::String());
cv::String paramHelp(const char* name) const;
const String& help=String());
String paramHelp(const char* name) const;
int paramType(const char* name) const;
void getParams(std::vector<cv::String>& names) const;
void getParams(std::vector<String>& names) const;
void write(const Algorithm* algo, FileStorage& fs) const;
void read(Algorithm* algo, const FileNode& fn) const;
cv::String name() const;
String name() const;
void addParam(Algorithm& algo, const char* name,
int& value, bool readOnly=false,
int (Algorithm::*getter)()=0,
void (Algorithm::*setter)(int)=0,
const cv::String& help=cv::String());
const String& help=String());
void addParam(Algorithm& algo, const char* name,
bool& value, bool readOnly=false,
int (Algorithm::*getter)()=0,
void (Algorithm::*setter)(int)=0,
const cv::String& help=cv::String());
const String& help=String());
void addParam(Algorithm& algo, const char* name,
double& value, bool readOnly=false,
double (Algorithm::*getter)()=0,
void (Algorithm::*setter)(double)=0,
const cv::String& help=cv::String());
const String& help=String());
void addParam(Algorithm& algo, const char* name,
cv::String& value, bool readOnly=false,
cv::String (Algorithm::*getter)()=0,
void (Algorithm::*setter)(const cv::String&)=0,
const cv::String& help=cv::String());
String& value, bool readOnly=false,
String (Algorithm::*getter)()=0,
void (Algorithm::*setter)(const String&)=0,
const String& help=String());
void addParam(Algorithm& algo, const char* name,
Mat& value, bool readOnly=false,
Mat (Algorithm::*getter)()=0,
void (Algorithm::*setter)(const Mat&)=0,
const cv::String& help=cv::String());
const String& help=String());
void addParam(Algorithm& algo, const char* name,
std::vector<Mat>& value, bool readOnly=false,
std::vector<Mat> (Algorithm::*getter)()=0,
void (Algorithm::*setter)(const std::vector<Mat>&)=0,
const cv::String& help=cv::String());
const String& help=String());
void addParam(Algorithm& algo, const char* name,
Ptr<Algorithm>& value, bool readOnly=false,
Ptr<Algorithm> (Algorithm::*getter)()=0,
void (Algorithm::*setter)(const Ptr<Algorithm>&)=0,
const cv::String& help=cv::String());
const String& help=String());
void addParam(Algorithm& algo, const char* name,
float& value, bool readOnly=false,
float (Algorithm::*getter)()=0,
void (Algorithm::*setter)(float)=0,
const cv::String& help=cv::String());
const String& help=String());
void addParam(Algorithm& algo, const char* name,
unsigned int& value, bool readOnly=false,
unsigned int (Algorithm::*getter)()=0,
void (Algorithm::*setter)(unsigned int)=0,
const cv::String& help=cv::String());
const String& help=String());
void addParam(Algorithm& algo, const char* name,
uint64& value, bool readOnly=false,
uint64 (Algorithm::*getter)()=0,
void (Algorithm::*setter)(uint64)=0,
const cv::String& help=cv::String());
const String& help=String());
void addParam(Algorithm& algo, const char* name,
uchar& value, bool readOnly=false,
uchar (Algorithm::*getter)()=0,
void (Algorithm::*setter)(uchar)=0,
const cv::String& help=cv::String());
const String& help=String());
template<typename _Tp, typename _Base> void addParam(Algorithm& algo, const char* name,
Ptr<_Tp>& value, bool readOnly=false,
Ptr<_Tp> (Algorithm::*getter)()=0,
void (Algorithm::*setter)(const Ptr<_Tp>&)=0,
const cv::String& help=cv::String());
const String& help=String());
template<typename _Tp> void addParam(Algorithm& algo, const char* name,
Ptr<_Tp>& value, bool readOnly=false,
Ptr<_Tp> (Algorithm::*getter)()=0,
void (Algorithm::*setter)(const Ptr<_Tp>&)=0,
const cv::String& help=cv::String());
const String& help=String());
protected:
AlgorithmInfoData* data;
void set(Algorithm* algo, const char* name, int argType,
@@ -4323,13 +4323,13 @@ struct CV_EXPORTS Param
Param(int _type, bool _readonly, int _offset,
Algorithm::Getter _getter=0,
Algorithm::Setter _setter=0,
const cv::String& _help=cv::String());
const String& _help=String());
int type;
int offset;
bool readonly;
Algorithm::Getter getter;
Algorithm::Setter setter;
cv::String help;
String help;
};
template<> struct ParamType<bool>
@@ -4356,10 +4356,10 @@ template<> struct ParamType<double>
enum { type = Param::REAL };
};
template<> struct ParamType<cv::String>
template<> struct ParamType<String>
{
typedef const cv::String& const_param_type;
typedef cv::String member_type;
typedef const String& const_param_type;
typedef String member_type;
enum { type = Param::STRING };
};