SheafSystem  0.0.0.0
section_space_schema_member.impl.h
1 
2 
3 //
4 // Copyright (c) 2014 Limit Point Systems, Inc.
5 //
6 
7 // Implementation for section_space_schema_member facet function templates.
8 
9 #ifndef SECTION_SPACE_SCHEMA_MEMBER_IMPL_H
10 #define SECTION_SPACE_SCHEMA_MEMBER_IMPL_H
11 
12 #ifndef SHEAF_DLL_SPEC_H
13 #include "SheafSystem/sheaf_dll_spec.h"
14 #endif
15 
16 #ifndef ASSERT_CONTRACT_H
17 #include "SheafSystem/assert_contract.h"
18 #endif
19 
20 #ifndef SECTION_SPACE_SCHEMA_MEMBER_H
21 #include "SheafSystem/section_space_schema_member.h"
22 #endif
23 
24 template <typename F>
25 F&
28 {
29  // Preconditions:
30 
31  require(dynamic_cast<F*>(&fiber_space()) != 0);
32 
33  // Body:
34 
35  F& result = dynamic_cast<F&>(fiber_space());
36 
37  // Postconditions:
38 
39  // Exit:
40 
41  return result;
42 }
43 
44 template <typename F>
45 const F&
47 fiber_space() const
48 {
49  // Preconditions:
50 
51  require(dynamic_cast<F*>(&fiber_space()) != 0);
52 
53  // Body:
54 
55  const F& result = dynamic_cast<F&>(fiber_space());
56 
57  // Postconditions:
58 
59  // Exit:
60 
61  return result;
62 }
63 
64 
65 #endif // ifndef SECTION_SPACE_SCHEMA_MEMBER_IMPL_H
poset & fiber_space()
The fiber space for section spaces on this schema (mutable version).