[prev in list] [next in list] [prev in thread] [next in thread] 

List:       lyx-cvs
Subject:    [LyX/master] Encodings: Add CharInfo to Encoding.h
From:       Vincent van Ravesteijn <vfr () lyx ! org>
Date:       2013-09-29 15:03:23
Message-ID: 20130929150323.DC767280549 () lyx ! lyx ! org
[Download RAW message or body]

commit 01e94f5e038602ac29ee9c4e9afbca268a4a1f98
Author: Vincent van Ravesteijn <vfr@lyx.org>
Date:   Sun Sep 29 14:27:48 2013 +0200

    Encodings: Add CharInfo to Encoding.h

diff --git a/src/Encoding.cpp b/src/Encoding.cpp
index d925292..06d599d 100644
--- a/src/Encoding.cpp
+++ b/src/Encoding.cpp
@@ -231,57 +231,6 @@ char_type const arabic_start = 0x0621;
 char_type const arabic_end = 0x06cc;
 
 
-enum CharInfoFlags {
-	///
-	CharInfoCombining = 1,
-	///
-	CharInfoTextFeature = 2,
-	///
-	CharInfoMathFeature = 4,
-	///
-	CharInfoForce = 8,
-	///
-	CharInfoTextNoTermination = 16,
-	///
-	CharInfoMathNoTermination = 32,
-	///
-	CharInfoForceSelected = 64,
-};
-
-/// Information about a single UCS4 character
-struct CharInfo {
-	/// LaTeX command (text mode) for this character
-	docstring textcommand;
-	/// LaTeX command (math mode) for this character
-	docstring mathcommand;
-	/// Needed LaTeX preamble (or feature) for text mode
-	string textpreamble;
-	/// Needed LaTeX preamble (or feature) for math mode
-	string mathpreamble;
-	/// Is this a combining character?
-	bool combining() const { return flags & CharInfoCombining ? true : false; }
-	/// Is \c textpreamble a feature known by LaTeXFeatures, or a raw LaTeX
-	/// command?
-	bool textfeature() const { return flags & CharInfoTextFeature ? true : false; }
-	/// Is \c mathpreamble a feature known by LaTeXFeatures, or a raw LaTeX
-	/// command?
-	bool mathfeature() const { return flags & CharInfoMathFeature ? true : false; }
-	/// Always force the LaTeX command, even if the encoding contains
-	/// this character?
-	bool force() const { return flags & CharInfoForce ? true : false; }
-	/// Force the LaTeX command for some encodings?
-	bool forceselected() const { return flags & CharInfoForceSelected ? true : false; }
-	/// TIPA shortcut
-	string tipashortcut;
-	/// \c textcommand needs no termination (such as {} or space).
-	bool textnotermination() const { return flags & CharInfoTextNoTermination ? true : false; }
-	/// \c mathcommand needs no termination (such as {} or space).
-	bool mathnotermination() const { return flags & CharInfoMathNoTermination ? true : false; }
-	///
-	unsigned int flags;
-};
-
-
 typedef map<char_type, CharInfo> CharInfoMap;
 CharInfoMap unicodesymbols;
 
diff --git a/src/Encoding.h b/src/Encoding.h
index 6a1f89c..f0266eb 100644
--- a/src/Encoding.h
+++ b/src/Encoding.h
@@ -39,6 +39,59 @@ public:
 };
 
 
+enum CharInfoFlags {
+	///
+	CharInfoCombining = 1,
+	///
+	CharInfoTextFeature = 2,
+	///
+	CharInfoMathFeature = 4,
+	///
+	CharInfoForce = 8,
+	///
+	CharInfoTextNoTermination = 16,
+	///
+	CharInfoMathNoTermination = 32,
+	///
+	CharInfoForceSelected = 64,
+};
+
+
+/// Information about a single UCS4 character
+class CharInfo {
+public:
+	/// LaTeX command (text mode) for this character
+	docstring textcommand;
+	/// LaTeX command (math mode) for this character
+	docstring mathcommand;
+	/// Needed LaTeX preamble (or feature) for text mode
+	std::string textpreamble;
+	/// Needed LaTeX preamble (or feature) for math mode
+	std::string mathpreamble;
+	/// Is this a combining character?
+	bool combining() const { return flags & CharInfoCombining ? true : false; }
+	/// Is \c textpreamble a feature known by LaTeXFeatures, or a raw LaTeX
+	/// command?
+	bool textfeature() const { return flags & CharInfoTextFeature ? true : false; }
+	/// Is \c mathpreamble a feature known by LaTeXFeatures, or a raw LaTeX
+	/// command?
+	bool mathfeature() const { return flags & CharInfoMathFeature ? true : false; }
+	/// Always force the LaTeX command, even if the encoding contains
+	/// this character?
+	bool force() const { return flags & CharInfoForce ? true : false; }
+	/// Force the LaTeX command for some encodings?
+	bool forceselected() const { return flags & CharInfoForceSelected ? true : false; }
+	/// TIPA shortcut
+	std::string tipashortcut;
+	/// \c textcommand needs no termination (such as {} or space).
+	bool textnotermination() const { return flags & CharInfoTextNoTermination ? true : false; }
+	/// \c mathcommand needs no termination (such as {} or space).
+	bool mathnotermination() const { return flags & CharInfoMathNoTermination ? true : false; }
+	///
+	unsigned int flags;
+};
+
+
 ///
 class Encoding {
 public:

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic