CMake Nightly Date Stamp
[kiteware-cmake.git] / Source / cmNewLineStyle.h
bloba2b985bde0e2df36f1af019c7ce53231e65017ac
1 /* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
2 file Copyright.txt or https://cmake.org/licensing for details. */
3 #pragma once
5 #include "cmConfigure.h" // IWYU pragma: keep
7 #include <string>
8 #include <vector>
10 class cmNewLineStyle
12 public:
13 cmNewLineStyle();
15 enum Style
17 Invalid,
18 // LF = '\n', 0x0A, 10
19 // CR = '\r', 0x0D, 13
20 LF, // Unix
21 CRLF // Dos
24 void SetStyle(Style);
25 Style GetStyle() const;
27 bool IsValid() const;
29 bool ReadFromArguments(const std::vector<std::string>& args,
30 std::string& errorString);
32 std::string GetCharacters() const;
34 private:
35 Style NewLineStyle = Invalid;