libqasm
library for handling cQASM files
cqasm-tree.hpp
Go to the documentation of this file.
1 
5 #pragma once
6 
7 #include "tree-annotatable.hpp"
8 #include "tree-base.hpp"
9 
10 namespace cqasm {
11 
15 namespace tree {
16 
18 
21 
22 template <class T>
23 using Maybe = ::tree::base::Maybe<T>;
24 
25 template <class T>
26 using One = ::tree::base::One<T>;
27 
28 template <class T>
29 using Any = ::tree::base::Any<T>;
30 
31 template <class T>
32 using Many = ::tree::base::Many<T>;
33 
34 template <class T>
35 using Link = ::tree::base::Link<T>;
36 
37 template <class T>
38 using OptLink = ::tree::base::OptLink<T>;
39 
43 template <class T, typename... Args>
44 One<T> make(Args... args) {
45  return One<T>(std::make_shared<T>(args...));
46 }
47 
48 } // namespace tree
49 } // namespace cqasm
::tree::base::Base Base
Definition: cqasm-tree.hpp:20
::tree::base::Maybe< T > Maybe
Definition: cqasm-tree.hpp:23
::tree::base::Link< T > Link
Definition: cqasm-tree.hpp:35
::tree::base::OptLink< T > OptLink
Definition: cqasm-tree.hpp:38
Toplevel namespace with entry points for the new API.
One< T > make(Args... args)
Constructs a One object, analogous to std::make_shared.
Definition: cqasm-tree.hpp:44
::tree::base::Any< T > Any
Definition: cqasm-tree.hpp:29
::tree::base::Many< T > Many
Definition: cqasm-tree.hpp:32
::tree::signed_size_t signed_size_t
Definition: cqasm-tree.hpp:17
::tree::base::One< T > One
Definition: cqasm-tree.hpp:26
::tree::annotatable::Annotatable Annotatable
Definition: cqasm-tree.hpp:19