Verified Commit 51096049 authored by Flavien BRIDAULT-LOUCHEZ's avatar Flavien BRIDAULT-LOUCHEZ
Browse files

fix(io): extension() getter function in reader/writer made const

parent edebf6e7
......@@ -81,7 +81,7 @@ void ArrayReader::read()
//------------------------------------------------------------------------------
std::string ArrayReader::extension()
std::string ArrayReader::extension() const
{
return ".raw";
}
......
......@@ -60,7 +60,7 @@ public:
IO_BASE_API void read() override;
/// Defines extension supported by this reader ".raw"
IO_BASE_API std::string extension() override;
IO_BASE_API std::string extension() const override;
};
} // namespace reader
......
......@@ -376,7 +376,7 @@ void DictionaryReader::read()
//------------------------------------------------------------------------------
std::string DictionaryReader::extension()
std::string DictionaryReader::extension() const
{
return ".dic";
}
......
......@@ -72,7 +72,7 @@ public:
/// Read the file with standard iostream API.
IO_BASE_API void read() override;
IO_BASE_API std::string extension() override;
IO_BASE_API std::string extension() const override;
/// Returns the default dictionary path ( file in rc directory path of fwDataIO library )
IO_BASE_API static std::filesystem::path getDefaultDictionaryPath();
......
......@@ -56,7 +56,7 @@ public:
//------------------------------------------------------------------------------
std::string extension() override
std::string extension() const override
{
return "";
}
......
......@@ -83,7 +83,7 @@ void GzArrayReader::read()
//------------------------------------------------------------------------------
std::string GzArrayReader::extension()
std::string GzArrayReader::extension() const
{
return ".raw.gz";
}
......
......@@ -65,7 +65,7 @@ public:
IO_BASE_API void read() override;
/// Defines extensions supported by this reader. Here: ".raw.gz"
IO_BASE_API std::string extension() override;
IO_BASE_API std::string extension() const override;
};
} // namespace reader
......
......@@ -96,7 +96,7 @@ void GzBufferImageReader::read()
//------------------------------------------------------------------------------
std::string GzBufferImageReader::extension()
std::string GzBufferImageReader::extension() const
{
return ".raw.gz";
}
......
......@@ -64,7 +64,7 @@ public:
IO_BASE_API void read() override;
/// Defines the extensions supported by this reader. Here: ".raw.gz"
IO_BASE_API std::string extension() override;
IO_BASE_API std::string extension() const override;
};
} // namespace reader
......
......@@ -100,7 +100,7 @@ public:
*/
IO_BASE_API virtual core::tools::Object::sptr getObject() const;
IO_BASE_API virtual std::string extension() = 0;
IO_BASE_API virtual std::string extension() const = 0;
/**
* @brief Requests reader abortion.
......
......@@ -72,7 +72,7 @@ void Matrix4Reader::read()
//------------------------------------------------------------------------------
std::string Matrix4Reader::extension()
std::string Matrix4Reader::extension() const
{
return ".trf";
}
......
......@@ -63,7 +63,7 @@ public:
IO_BASE_API void read() override;
/// Defines the extensions supported by this reader. Here: ".trf"
IO_BASE_API std::string extension() override;
IO_BASE_API std::string extension() const override;
};
}
......
......@@ -69,7 +69,7 @@ void ArrayWriter::write()
//------------------------------------------------------------------------------
std::string ArrayWriter::extension()
std::string ArrayWriter::extension() const
{
return ".raw";
}
......
......@@ -62,7 +62,7 @@ public:
IO_BASE_API void write() override;
/// Defines extensions supported by this writer. Here: ".raw"
IO_BASE_API std::string extension() override;
IO_BASE_API std::string extension() const override;
};
} // namespace writer
......
......@@ -85,7 +85,7 @@ void GzArrayWriter::write()
//------------------------------------------------------------------------------
std::string GzArrayWriter::extension()
std::string GzArrayWriter::extension() const
{
return ".raw.gz";
}
......
......@@ -63,7 +63,7 @@ public:
IO_BASE_API void write() override;
/// Defines the extensions supported by this writer. Here: ".raw.gz"
IO_BASE_API std::string extension() override;
IO_BASE_API std::string extension() const override;
};
} // namespace writer
......
......@@ -100,7 +100,7 @@ void GzBufferImageWriter::write()
//------------------------------------------------------------------------------
std::string GzBufferImageWriter::extension()
std::string GzBufferImageWriter::extension() const
{
return ".raw.gz";
}
......
......@@ -65,7 +65,7 @@ public:
IO_BASE_API void write() override;
/// Defines the extensions supported by this writer. Here: ".raw.gz"
IO_BASE_API std::string extension() override;
IO_BASE_API std::string extension() const override;
};
} // namespace writer
......
......@@ -60,7 +60,7 @@ core::tools::Object::csptr IObjectWriter::getObject() const
//------------------------------------------------------------------------------
std::string IObjectWriter::extension()
std::string IObjectWriter::extension() const
{
return std::string();
}
......
......@@ -106,7 +106,7 @@ public:
* The extension can be empty (for a repository for example) or must return a string BEGINNING WITH A DOT
* by default be empty
*/
IO_BASE_API virtual std::string extension() = 0;
IO_BASE_API virtual std::string extension() const = 0;
/**
* @brief Requests writer abortion.
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment