[36c236]: library / tools / ecf / ast / et_ecf_external_include.e  Maximize  Restore  History

Download this file

71 lines (52 with data), 1.6 kB

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
note
description:
"ECF external includes"
library: "Gobo Eiffel Tools Library"
copyright: "Copyright (c) 2008-2014, Eric Bezault and others"
license: "MIT License"
date: "$Date$"
revision: "$Revision$"
class ET_ECF_EXTERNAL_INCLUDE
inherit
ET_ECF_CONDITIONED
KL_SHARED_FILE_SYSTEM
export {NONE} all end
create
make
feature {NONE} -- Initialization
make (a_pathname: like pathname)
-- Create a new external include.
require
a_pathname_not_void: a_pathname /= Void
do
pathname := a_pathname
ensure
pathname_set: pathname = a_pathname
end
feature -- Access
pathname: STRING
-- Pathname
feature -- Element change
fill_external_includes (a_universe: ET_ECF_INTERNAL_UNIVERSE; a_state: ET_ECF_STATE)
-- Add to `a_universe.current_system' the current external include pathname
-- of conditions satisfy `a_state'.
require
a_universe_not_void: a_universe /= Void
a_state_not_void: a_state /= Void
local
l_pathname: STRING
do
if is_enabled (a_state) then
if pathname.starts_with ("$ECF_CONFIG_PATH") then
l_pathname := file_system.dirname (a_universe.filename) + pathname.substring (17, pathname.count)
elseif pathname.starts_with ("$(ECF_CONFIG_PATH)") or pathname.starts_with ("${ECF_CONFIG_PATH}") then
l_pathname := file_system.dirname (a_universe.filename) + pathname.substring (19, pathname.count)
else
l_pathname := pathname
end
a_universe.current_system.external_include_pathnames.force_last (l_pathname)
end
end
invariant
pathname_not_void: pathname /= Void
end

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks