pull/11247/head
lopespt 7 years ago
parent 7bc980edaf
commit c17ce1a0af
  1. 2
      modules/core/include/opencv2/core/persistence.hpp
  2. 6
      modules/core/src/persistence_cpp.cpp

@ -438,6 +438,8 @@ public:
* @param name Name of the written object * @param name Name of the written object
* @param val Value of the written object * @param val Value of the written object
*/ */
CV_WRAP void write(const String& name, int val);
/// @overload
CV_WRAP void write(const String& name, double val); CV_WRAP void write(const String& name, double val);
/// @overload /// @overload
CV_WRAP void write(const String& name, const String& val); CV_WRAP void write(const String& name, const String& val);

@ -178,6 +178,12 @@ void FileStorage::writeObj( const String& name, const void* obj )
cvWrite( fs, name.size() > 0 ? name.c_str() : 0, obj ); cvWrite( fs, name.size() > 0 ? name.c_str() : 0, obj );
} }
void FileStorage::write( const String& name, int val )
{
*this << name << val;
}
void FileStorage::write( const String& name, double val ) void FileStorage::write( const String& name, double val )
{ {
*this << name << val; *this << name << val;

Loading…
Cancel
Save