source: src/ResolvExpr/Alternative.h @ bd4f2e9

ADTaaron-thesisarm-ehast-experimentalcleanup-dtorsdeferred_resndemanglerenumforall-pointer-decayjacob/cs343-translationjenkins-sandboxnew-astnew-ast-unique-exprnew-envno_listpersistent-indexerpthread-emulationqualifiedEnumresolv-newwith_gc
Last change on this file since bd4f2e9 was bd4f2e9, checked in by Aaron Moss <a3moss@…>, 6 years ago

Switch AltList? to std::vector from std::list

  • Property mode set to 100644
File size: 1.6 KB
Line 
1//
2// Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
3//
4// The contents of this file are covered under the licence agreement in the
5// file "LICENCE" distributed with Cforall.
6//
7// Alternative.h --
8//
9// Author           : Richard C. Bilson
10// Created On       : Sat May 16 23:45:43 2015
11// Last Modified By : Peter A. Buhr
12// Last Modified On : Sat Jul 22 09:36:36 2017
13// Update Count     : 3
14//
15
16#pragma once
17
18#include <iosfwd>             // for ostream
19#include <vector>             // for vector
20
21#include "Cost.h"             // for Cost
22#include "TypeEnvironment.h"  // for TypeEnvironment
23
24class Expression;
25
26namespace ResolvExpr {
27        struct Alternative {
28                Alternative();
29                Alternative( Expression *expr, const TypeEnvironment &env, const Cost &cost );
30                Alternative( Expression *expr, const TypeEnvironment &env, const Cost &cost, const Cost &cvtCost );
31                Alternative( const Alternative &other );
32                Alternative &operator=( const Alternative &other );
33                Alternative( Alternative && other );
34                Alternative &operator=( Alternative && other );
35                ~Alternative();
36
37                void print( std::ostream &os, Indenter indent = {} ) const;
38
39                Cost cost;
40                Cost cvtCost;
41                Expression *expr;
42                TypeEnvironment env;
43        };
44
45        typedef std::vector< Alternative > AltList;
46
47        /// Moves all elements from src to the end of dst
48        void splice( AltList& dst, AltList& src );
49
50        /// Moves all elements from src to the beginning of dst
51        void spliceBegin( AltList& dst, AltList& src );
52} // namespace ResolvExpr
53
54// Local Variables: //
55// tab-width: 4 //
56// mode: c++ //
57// compile-command: "make install" //
58// End: //
Note: See TracBrowser for help on using the repository browser.