-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
enh(multi-class) use hybrid scope approach
- Loading branch information
1 parent
7b6df3d
commit 51806aa
Showing
36 changed files
with
102 additions
and
86 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
<span class="hljs-keyword">const</span> <span class="hljs-keyword">uint64_t</span> MAX_INT_64; | ||
|
||
<span class="hljs-keyword">struct</span> <span class="hljs-title hljs-class">position_tag</span>; | ||
<span class="hljs-keyword">struct</span> <span class="hljs-title class_">position_tag</span>; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,24 @@ | ||
<span class="hljs-keyword">template</span> <<span class="hljs-keyword">class</span> <span class="hljs-title hljs-class">T</span>> <span class="hljs-comment">// comment</span> | ||
<span class="hljs-keyword">template</span> <<span class="hljs-keyword">class</span> <span class="hljs-title class_">T</span>> <span class="hljs-comment">// comment</span> | ||
<span class="hljs-function"><span class="hljs-keyword">auto</span> <span class="hljs-title">foo</span><span class="hljs-params">(T x)</span> </span>{ ... }; | ||
|
||
<span class="hljs-keyword">namespace</span> impl { | ||
<span class="hljs-keyword">template</span><<span class="hljs-keyword">typename</span> T> | ||
<span class="hljs-keyword">struct</span> <span class="hljs-title hljs-class">is_streamable</span><T, std::<span class="hljs-keyword">void_t</span><<span class="hljs-keyword">decltype</span>(std::declval<std::wostream &>() << std::declval<T>())>> : std::true_type { }; | ||
<span class="hljs-keyword">struct</span> <span class="hljs-title class_">is_streamable</span><T, std::<span class="hljs-keyword">void_t</span><<span class="hljs-keyword">decltype</span>(std::declval<std::wostream &>() << std::declval<T>())>> : std::true_type { }; | ||
} | ||
|
||
<span class="hljs-comment">// Disable overload for already valid operands.</span> | ||
<span class="hljs-keyword">template</span><<span class="hljs-keyword">class</span> <span class="hljs-title hljs-class">T</span>, class = std::<span class="hljs-keyword">enable_if_t</span><!impl::is_streamable_v<<span class="hljs-keyword">const</span> T &> && std::is_convertible_v<<span class="hljs-keyword">const</span> T &, std::wstring_view>>> | ||
<span class="hljs-keyword">template</span><<span class="hljs-keyword">class</span> <span class="hljs-title class_">T</span>, class = std::<span class="hljs-keyword">enable_if_t</span><!impl::is_streamable_v<<span class="hljs-keyword">const</span> T &> && std::is_convertible_v<<span class="hljs-keyword">const</span> T &, std::wstring_view>>> | ||
std::wostream &<span class="hljs-keyword">operator</span> <<(std::wostream &stream, <span class="hljs-keyword">const</span> T &thing) | ||
{ | ||
<span class="hljs-keyword">return</span> stream << <span class="hljs-keyword">static_cast</span><std::wstring_view>(thing); | ||
} | ||
|
||
<span class="hljs-keyword">enum struct</span> <span class="hljs-title hljs-class">DataHolder</span> { }; | ||
<span class="hljs-keyword">enum class</span> <span class="hljs-title hljs-class">DataThingy</span> { }; | ||
<span class="hljs-keyword">enum class</span> <span class="hljs-title hljs-class">Boolean</span> : <span class="hljs-keyword">char</span> { | ||
<span class="hljs-keyword">enum struct</span> <span class="hljs-title class_">DataHolder</span> { }; | ||
<span class="hljs-keyword">enum class</span> <span class="hljs-title class_">DataThingy</span> { }; | ||
<span class="hljs-keyword">enum class</span> <span class="hljs-title class_">Boolean</span> : <span class="hljs-keyword">char</span> { | ||
True, False, FileNotFound | ||
}; | ||
|
||
<span class="hljs-keyword">union</span> <span class="hljs-title hljs-class">Soy</span> | ||
<span class="hljs-keyword">union</span> <span class="hljs-title class_">Soy</span> | ||
{ | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
<span class="hljs-keyword">public</span> <span class="hljs-keyword">static</span> <A,B,C> Tuple<A,B,C> <span class="hljs-title hljs-function">fun</span><span class="hljs-params">(Future<Tuple<A,B,C>> future)</span> <span class="hljs-keyword">throws</span> Exceptions { | ||
<span class="hljs-keyword">public</span> <span class="hljs-keyword">static</span> <A,B,C> Tuple<A,B,C> <span class="hljs-title function_">fun</span><span class="hljs-params">(Future<Tuple<A,B,C>> future)</span> <span class="hljs-keyword">throws</span> Exceptions { | ||
} | ||
|
||
<span class="hljs-keyword">static</span> Optional<List<Token>> <span class="hljs-title hljs-function">parseAll</span><span class="hljs-params">(String s)</span> { | ||
<span class="hljs-keyword">static</span> Optional<List<Token>> <span class="hljs-title function_">parseAll</span><span class="hljs-params">(String s)</span> { | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
<span class="hljs-keyword">public</span> <span class="hljs-keyword">class</span> <span class="hljs-title hljs-class">DefaultDataDaoImpl</span> { | ||
<span class="hljs-keyword">public</span> <span class="hljs-keyword">class</span> <span class="hljs-title class_">DefaultDataDaoImpl</span> { | ||
<span class="hljs-keyword">private</span> List<AbstractCmrDataProcessor> cmrDataProcessors; | ||
} | ||
|
||
<span class="hljs-keyword">public</span> <span class="hljs-keyword">class</span> <span class="hljs-title hljs-class">DefaultDataDaoImpl</span> { | ||
<span class="hljs-keyword">public</span> <span class="hljs-keyword">class</span> <span class="hljs-title class_">DefaultDataDaoImpl</span> { | ||
<span class="hljs-keyword">private</span> List<AbstractCmrDataProcessor, AbstractCmrDataProcessor> cmrDataProcessors; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
<span class="hljs-keyword">fn</span> <span class="hljs-title hljs-function">sqr</span>(i: <span class="hljs-type">i32</span>) { i * i } | ||
<span class="hljs-keyword">trait</span> <span class="hljs-title hljs-class">Minimum</span> : <span class="hljs-built_in">Copy</span> {} | ||
<span class="hljs-keyword">pub</span> <span class="hljs-keyword">trait</span> <span class="hljs-title hljs-class">Builder</span> <span class="hljs-keyword">where</span> <span class="hljs-keyword">Self</span>: <span class="hljs-built_in">Sized</span> + <span class="hljs-built_in">Iterator</span><Item=Event> {} | ||
<span class="hljs-keyword">fn</span> <span class="hljs-title function_">sqr</span>(i: <span class="hljs-type">i32</span>) { i * i } | ||
<span class="hljs-keyword">trait</span> <span class="hljs-title class_">Minimum</span> : <span class="hljs-built_in">Copy</span> {} | ||
<span class="hljs-keyword">pub</span> <span class="hljs-keyword">trait</span> <span class="hljs-title class_">Builder</span> <span class="hljs-keyword">where</span> <span class="hljs-keyword">Self</span>: <span class="hljs-built_in">Sized</span> + <span class="hljs-built_in">Iterator</span><Item=Event> {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
<span class="hljs-keyword">type</span> <span class="hljs-title hljs-class">A</span>: Trait; | ||
<span class="hljs-keyword">type</span> <span class="hljs-title hljs-class">A</span>; | ||
<span class="hljs-keyword">type</span> <span class="hljs-title hljs-class">A</span> = B; | ||
<span class="hljs-keyword">type</span> <span class="hljs-title hljs-class">R</span><T> = m::R<T, ConcreteError> | ||
<span class="hljs-keyword">type</span> <span class="hljs-title class_">A</span>: Trait; | ||
<span class="hljs-keyword">type</span> <span class="hljs-title class_">A</span>; | ||
<span class="hljs-keyword">type</span> <span class="hljs-title class_">A</span> = B; | ||
<span class="hljs-keyword">type</span> <span class="hljs-title class_">R</span><T> = m::R<T, ConcreteError> |
Oops, something went wrong.