packaging: Initial packaging
[platform/upstream/cmake.git] / Source / cmNewLineStyle.h
1 /*============================================================================
2   CMake - Cross Platform Makefile Generator
3   Copyright 2011 Kitware, Inc., Insight Software Consortium
4
5   Distributed under the OSI-approved BSD License (the "License");
6   see accompanying file Copyright.txt for details.
7
8   This software is distributed WITHOUT ANY WARRANTY; without even the
9   implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
10   See the License for more information.
11 ============================================================================*/
12 #ifndef cmNewLineStyle_h
13 #define cmNewLineStyle_h
14
15 #include "cmStandardIncludes.h"
16
17 class cmNewLineStyle
18 {
19 public:
20
21   cmNewLineStyle();
22
23   enum Style
24   {
25     Invalid,
26                // LF = '\n', 0x0A, 10
27                // CR = '\r', 0x0D, 13
28     LF,        // Unix
29     CRLF       // Dos
30   };
31
32   void SetStyle(Style);
33   Style GetStyle() const;
34
35   bool IsValid() const;
36
37   bool ReadFromArguments(const std::vector<std::string>& args,
38                          std::string &errorString);
39
40   const std::string GetCharacters() const;
41
42 private:
43   Style NewLineStyle;
44 };
45
46 #endif