SheafSystem  0.0.0.0
eval_family.impl.h
Go to the documentation of this file.
1 
2 //
3 // Copyright (c) 2014 Limit Point Systems, Inc.
4 //
5 // Licensed under the Apache License, Version 2.0 (the "License");
6 // you may not use this file except in compliance with the License.
7 // You may obtain a copy of the License at
8 //
9 // http://www.apache.org/licenses/LICENSE-2.0
10 //
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an "AS IS" BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
16 //
17 
20 
21 #ifndef EVAL_FAMILY_IMPL_H
22 #define EVAL_FAMILY_IMPL_H
23 
24 template <typename S>
25 S*
27 member(pod_index_type xtype_id)
28 {
29  // Preconditions:
30 
31 
32  // Body:
33 
34  S* result = dynamic_cast<S*>(member(xtype_id));
35 
36  // Postconditions:
37 
38 
39  // Exit:
40 
41  return result;
42 }
43 
44 template <typename S>
45 S*
48 {
49  // Preconditions:
50 
51 
52  // Body:
53 
54  S* result = dynamic_cast<S*>(member(xhost, xhub_id));
55 
56  // Postconditions:
57 
58 
59  // Exit:
60 
61  return result;
62 }
63 
64 template <typename S>
65 S*
67 member(const poset_state_handle& xhost, const scoped_index& xid)
68 {
69  // Preconditions:
70 
71 
72  // Body:
73 
74  S* result = dynamic_cast<S*>(member(xhost, xid.hub_pod()));
75 
76  // Postconditions:
77 
78 
79  // Exit:
80 
81  return result;
82 }
83 
84 
85 // ===========================================================
86 // NON-MEMBER FUNCTIONS
87 // ===========================================================
88 
89 
90 #endif // ifndef EVAL_FAMILY_IMPL_H
A client handle for a general, abstract partially order set.
An index within the external ("client") scope of a given id space.
Definition: scoped_index.h:116
int_type pod_index_type
The plain old data index type.
Definition: pod_types.h:49
section_evaluator * member(pod_index_type xtype_id) const
The evaluator associated with cell type xtype_id. Note that the result may be void.
Definition: eval_family.cc:301
pod_type hub_pod() const
The pod value of this mapped to the unglued hub id space.
Definition: scoped_index.h:710