BornAgain  1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
binutils.h
Go to the documentation of this file.
1 // ************************************************************************************************
2 //
3 // qt-mvvm: Model-view-view-model framework for large GUI applications
4 //
5 //! @file mvvm/model/mvvm/utils/binutils.h
6 //! @brief Defines class CLASS?
7 //!
8 //! @homepage http://www.bornagainproject.org
9 //! @license GNU General Public License v3 or higher (see COPYING)
10 //! @copyright Forschungszentrum Jülich GmbH 2020
11 //! @authors Gennady Pospelov et al, Scientific Computing Group at MLZ (see CITATION, AUTHORS)
12 //
13 // ************************************************************************************************
14 
15 #ifndef BORNAGAIN_MVVM_MODEL_MVVM_UTILS_BINUTILS_H
16 #define BORNAGAIN_MVVM_MODEL_MVVM_UTILS_BINUTILS_H
17 
18 #include "mvvm/model_export.h"
19 #include <string>
20 
21 namespace ModelView ::Utils {
22 
23 //! Returns true if file is binary
24 MVVM_MODEL_EXPORT bool is_binary(const std::string& filename);
25 
26 //! Returns true if file is text/ascii
27 MVVM_MODEL_EXPORT bool is_text(const std::string& filename);
28 
29 } // namespace ModelView::Utils
30 
31 #endif // BORNAGAIN_MVVM_MODEL_MVVM_UTILS_BINUTILS_H
std::string filename(const std::string &path)
Returns path without directory part ("Foo/Bar/Doz.int.gz" -> "Doz.int.gz")
bool is_text(const std::string &filename)
Returns true if file is text/ascii.
Definition: binutils.cpp:53
bool is_binary(const std::string &filename)
Returns true if file is binary.
Definition: binutils.cpp:33
materialitems.h Collection of materials to populate MaterialModel.