libcrn  3.9.5
A document image processing library
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
CRNAltoDescription.hpp
Go to the documentation of this file.
1 /* Copyright 2011-2016 CoReNum
2  *
3  * This file is part of libcrn.
4  *
5  * libcrn is free software: you can redistribute it and/or modify
6  * it under the terms of the GNU Lesser General Public License as published by
7  * the Free Software Foundation, either version 3 of the License, or
8  * (at your option) any later version.
9  *
10  * libcrn is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public License
16  * along with libcrn. If not, see <http://www.gnu.org/licenses/>.
17  *
18  * file: CRNAltoDescription.h
19  * \author Yann LEYDIER
20  */
21 
23 #ifdef CRNAlto_HEADER
24 
30 class Description: public Element
31 {
32  public:
33  Description(const Description&) = delete;
34  Description(Description&&) = default;
35  virtual ~Description() override {}
36  Description& operator=(const Description&) = delete;
37  Description& operator=(Description&&) = default;
38 
39  enum class MeasurementUnit { Undef = 0, Pixel, MM, Inch };
41  Option<MeasurementUnit> GetMeasurementUnit();
43  Option<StringUTF8> GetFilename();
44 
45  private:
47  Description(const Element &el);
49  Description(const Element &el, const Path &imagename);
50 
51  friend class Root;
52 };
53 
54 #else
55 #error you cannot include this file directly
56 #endif
57 
Description(const Description &)=delete
friend class Root
virtual ~Description() override
Option< MeasurementUnit > GetMeasurementUnit()
Returns the measurement unit of all metrics in the Alto.
Option< StringUTF8 > GetFilename()
Returns the filename of the image described by the Alto.
Alto global description.
Description & operator=(const Description &)=delete