YkESet 0.99.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/CODE_OF_CONDUCT.md +74 -0
- data/Gemfile +7 -0
- data/LICENSE +21 -0
- data/README.md +68 -0
- data/Rakefile +13 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/docs/Yk/EMMap/Iterator.html +626 -0
- data/docs/Yk/EMMap.html +1504 -0
- data/docs/Yk/EMSet/Iterator.html +626 -0
- data/docs/Yk/EMSet.html +1472 -0
- data/docs/Yk/EMap/Iterator.html +626 -0
- data/docs/Yk/EMap.html +1730 -0
- data/docs/Yk/ESet/Iterator.html +626 -0
- data/docs/Yk/ESet.html +1472 -0
- data/docs/Yk.html +126 -0
- data/docs/_index.html +170 -0
- data/docs/class_list.html +51 -0
- data/docs/css/common.css +1 -0
- data/docs/css/full_list.css +58 -0
- data/docs/css/style.css +496 -0
- data/docs/file_list.html +51 -0
- data/docs/frames.html +17 -0
- data/docs/index.html +170 -0
- data/docs/js/app.js +314 -0
- data/docs/js/full_list.js +216 -0
- data/docs/js/jquery.js +4 -0
- data/docs/method_list.html +571 -0
- data/docs/top-level-namespace.html +110 -0
- data/eset.gemspec +29 -0
- data/ext/Yk/.ruby-version +1 -0
- data/ext/Yk/.yardoc/checksums +1 -0
- data/ext/Yk/.yardoc/complete +0 -0
- data/ext/Yk/.yardoc/object_types +0 -0
- data/ext/Yk/.yardoc/objects/root.dat +0 -0
- data/ext/Yk/.yardoc/proxy_types +0 -0
- data/ext/Yk/Makefile +267 -0
- data/ext/Yk/depend +2 -0
- data/ext/Yk/extconf.rb +7 -0
- data/ext/Yk/for_yard.rb +192 -0
- data/ext/Yk/for_yard_product.rb +397 -0
- data/ext/Yk/map_tz +78 -0
- data/ext/Yk/set_tz +77 -0
- data/ext/Yk/stl_map_tz.h +1026 -0
- data/ext/Yk/stl_multimap_tz.h +927 -0
- data/ext/Yk/stl_multiset_tz.h +805 -0
- data/ext/Yk/stl_set_tz.h +815 -0
- data/ext/Yk/stl_set_tz_ruby.cpp +575 -0
- data/ext/Yk/stl_tree_tz.h +1865 -0
- data/ext/Yk/test_set.rb +115 -0
- data/ext/Yk/tree_tz.cc +489 -0
- data/ext/Yk/tz_stl_auto.cpp +84 -0
- data/lib/eset/version.rb +3 -0
- data/lib/eset.rb +7 -0
- metadata +101 -0
data/eset.gemspec
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
require_relative 'lib/eset/version'
|
|
2
|
+
|
|
3
|
+
Gem::Specification.new do |spec|
|
|
4
|
+
spec.name = "YkESet"
|
|
5
|
+
spec.version = ESet::VERSION
|
|
6
|
+
spec.authors = ["yougaein"]
|
|
7
|
+
spec.email = ["github@you.dix.asia"]
|
|
8
|
+
|
|
9
|
+
spec.summary = %q{Set/Map with external iterator, formerly ESet}
|
|
10
|
+
spec.description = %q{Set/Map with external iterator, formerly ESet}
|
|
11
|
+
spec.homepage = "https://github.com/yougaein/eset"
|
|
12
|
+
spec.required_ruby_version = Gem::Requirement.new(">= 2.3.0")
|
|
13
|
+
spec.extensions = %w[ext/Yk/extconf.rb]
|
|
14
|
+
spec.metadata["allowed_push_host"] = "https://rubygems.org"
|
|
15
|
+
|
|
16
|
+
spec.metadata["homepage_uri"] = "https://github.com/yougaein/eset"
|
|
17
|
+
spec.metadata["source_code_uri"] = "https://github.com/yougaein/eset"
|
|
18
|
+
spec.metadata["changelog_uri"] = "https://github.com/yougaein/eset"
|
|
19
|
+
|
|
20
|
+
# Specify which files should be added to the gem when it is released.
|
|
21
|
+
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
|
22
|
+
spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
|
|
23
|
+
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
|
24
|
+
end
|
|
25
|
+
spec.files.reject!{|f| !File.exists?(f)}
|
|
26
|
+
spec.bindir = "exe"
|
|
27
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
|
28
|
+
spec.require_paths = ["lib"]
|
|
29
|
+
end
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
2.7.0-dev
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
for_yard_product.rb 361d53726bfcde02f7a65c6e3ca7d85563c9805e
|
|
File without changes
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
data/ext/Yk/Makefile
ADDED
|
@@ -0,0 +1,267 @@
|
|
|
1
|
+
|
|
2
|
+
SHELL = /bin/sh
|
|
3
|
+
|
|
4
|
+
# V=0 quiet, V=1 verbose. other values don't work.
|
|
5
|
+
V = 0
|
|
6
|
+
Q1 = $(V:1=)
|
|
7
|
+
Q = $(Q1:0=@)
|
|
8
|
+
ECHO1 = $(V:1=@ :)
|
|
9
|
+
ECHO = $(ECHO1:0=@ echo)
|
|
10
|
+
NULLCMD = :
|
|
11
|
+
|
|
12
|
+
#### Start of system configuration section. ####
|
|
13
|
+
|
|
14
|
+
srcdir = .
|
|
15
|
+
topdir = /usr/local/share/rbenv/versions/2.7.0-dev/include/ruby-2.7.0
|
|
16
|
+
hdrdir = $(topdir)
|
|
17
|
+
arch_hdrdir = /usr/local/share/rbenv/versions/2.7.0-dev/include/ruby-2.7.0/x86_64-linux
|
|
18
|
+
PATH_SEPARATOR = :
|
|
19
|
+
VPATH = $(srcdir):$(arch_hdrdir)/ruby:$(hdrdir)/ruby
|
|
20
|
+
prefix = $(DESTDIR)/usr/local/share/rbenv/versions/2.7.0-dev
|
|
21
|
+
rubysitearchprefix = $(rubylibprefix)/$(sitearch)
|
|
22
|
+
rubyarchprefix = $(rubylibprefix)/$(arch)
|
|
23
|
+
rubylibprefix = $(libdir)/$(RUBY_BASE_NAME)
|
|
24
|
+
exec_prefix = $(prefix)
|
|
25
|
+
vendorarchhdrdir = $(vendorhdrdir)/$(sitearch)
|
|
26
|
+
sitearchhdrdir = $(sitehdrdir)/$(sitearch)
|
|
27
|
+
rubyarchhdrdir = $(rubyhdrdir)/$(arch)
|
|
28
|
+
vendorhdrdir = $(rubyhdrdir)/vendor_ruby
|
|
29
|
+
sitehdrdir = $(rubyhdrdir)/site_ruby
|
|
30
|
+
rubyhdrdir = $(includedir)/$(RUBY_VERSION_NAME)
|
|
31
|
+
vendorarchdir = $(vendorlibdir)/$(sitearch)
|
|
32
|
+
vendorlibdir = $(vendordir)/$(ruby_version)
|
|
33
|
+
vendordir = $(rubylibprefix)/vendor_ruby
|
|
34
|
+
sitearchdir = $(sitelibdir)/$(sitearch)
|
|
35
|
+
sitelibdir = $(sitedir)/$(ruby_version)
|
|
36
|
+
sitedir = $(rubylibprefix)/site_ruby
|
|
37
|
+
rubyarchdir = $(rubylibdir)/$(arch)
|
|
38
|
+
rubylibdir = $(rubylibprefix)/$(ruby_version)
|
|
39
|
+
sitearchincludedir = $(includedir)/$(sitearch)
|
|
40
|
+
archincludedir = $(includedir)/$(arch)
|
|
41
|
+
sitearchlibdir = $(libdir)/$(sitearch)
|
|
42
|
+
archlibdir = $(libdir)/$(arch)
|
|
43
|
+
ridir = $(datarootdir)/$(RI_BASE_NAME)
|
|
44
|
+
mandir = $(datarootdir)/man
|
|
45
|
+
localedir = $(datarootdir)/locale
|
|
46
|
+
libdir = $(exec_prefix)/lib
|
|
47
|
+
psdir = $(docdir)
|
|
48
|
+
pdfdir = $(docdir)
|
|
49
|
+
dvidir = $(docdir)
|
|
50
|
+
htmldir = $(docdir)
|
|
51
|
+
infodir = $(datarootdir)/info
|
|
52
|
+
docdir = $(datarootdir)/doc/$(PACKAGE)
|
|
53
|
+
oldincludedir = $(DESTDIR)/usr/include
|
|
54
|
+
includedir = $(prefix)/include
|
|
55
|
+
localstatedir = $(prefix)/var
|
|
56
|
+
sharedstatedir = $(prefix)/com
|
|
57
|
+
sysconfdir = $(prefix)/etc
|
|
58
|
+
datadir = $(datarootdir)
|
|
59
|
+
datarootdir = $(prefix)/share
|
|
60
|
+
libexecdir = $(exec_prefix)/libexec
|
|
61
|
+
sbindir = $(exec_prefix)/sbin
|
|
62
|
+
bindir = $(exec_prefix)/bin
|
|
63
|
+
archdir = $(rubyarchdir)
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
CC_WRAPPER =
|
|
67
|
+
CC = gcc -std=gnu99
|
|
68
|
+
CXX = g++
|
|
69
|
+
LIBRUBY = $(LIBRUBY_A)
|
|
70
|
+
LIBRUBY_A = lib$(RUBY_SO_NAME)-static.a
|
|
71
|
+
LIBRUBYARG_SHARED = -Wl,-rpath,$(libdir) -L$(libdir)
|
|
72
|
+
LIBRUBYARG_STATIC = -Wl,-rpath,$(libdir) -L$(libdir) -l$(RUBY_SO_NAME)-static $(MAINLIBS)
|
|
73
|
+
empty =
|
|
74
|
+
OUTFLAG = -o $(empty)
|
|
75
|
+
COUTFLAG = -o $(empty)
|
|
76
|
+
CSRCFLAG = $(empty)
|
|
77
|
+
|
|
78
|
+
RUBY_EXTCONF_H =
|
|
79
|
+
cflags = $(optflags) $(debugflags) $(warnflags)
|
|
80
|
+
cxxflags =
|
|
81
|
+
optflags = -O3
|
|
82
|
+
debugflags = -ggdb3
|
|
83
|
+
warnflags = -Wall -Wextra -Wdeprecated-declarations -Wimplicit-function-declaration -Wimplicit-int -Wpointer-arith -Wwrite-strings -Wmissing-noreturn -Wno-cast-function-type -Wno-constant-logical-operand -Wno-long-long -Wno-missing-field-initializers -Wno-overlength-strings -Wno-packed-bitfield-compat -Wno-parentheses-equality -Wno-self-assign -Wno-tautological-compare -Wno-unused-parameter -Wno-unused-value -Wsuggest-attribute=format -Wsuggest-attribute=noreturn -Wunused-variable
|
|
84
|
+
cppflags =
|
|
85
|
+
CCDLFLAGS = -fPIC
|
|
86
|
+
CFLAGS = $(CCDLFLAGS) $(cflags) $(ARCH_FLAG)
|
|
87
|
+
INCFLAGS = -I. -I$(arch_hdrdir) -I$(hdrdir)/ruby/backward -I$(hdrdir) -I$(srcdir)
|
|
88
|
+
DEFS =
|
|
89
|
+
CPPFLAGS = -I/usr/local/share/rbenv/versions/2.7.0-dev/include $(DEFS) $(cppflags)
|
|
90
|
+
CXXFLAGS = $(CCDLFLAGS) -g -O2 -O0 -g3 -std=c++1y $(ARCH_FLAG)
|
|
91
|
+
ldflags = -L. -L/usr/local/share/rbenv/versions/2.7.0-dev/lib -fstack-protector-strong -rdynamic -Wl,-export-dynamic
|
|
92
|
+
dldflags = -L/usr/local/share/rbenv/versions/2.7.0-dev/lib -Wl,--compress-debug-sections=zlib
|
|
93
|
+
ARCH_FLAG =
|
|
94
|
+
DLDFLAGS = $(ldflags) $(dldflags) $(ARCH_FLAG)
|
|
95
|
+
LDSHARED = $(CC) -shared
|
|
96
|
+
LDSHAREDXX = $(CXX) -shared
|
|
97
|
+
AR = ar
|
|
98
|
+
EXEEXT =
|
|
99
|
+
|
|
100
|
+
RUBY_INSTALL_NAME = $(RUBY_BASE_NAME)
|
|
101
|
+
RUBY_SO_NAME = ruby
|
|
102
|
+
RUBYW_INSTALL_NAME =
|
|
103
|
+
RUBY_VERSION_NAME = $(RUBY_BASE_NAME)-$(ruby_version)
|
|
104
|
+
RUBYW_BASE_NAME = rubyw
|
|
105
|
+
RUBY_BASE_NAME = ruby
|
|
106
|
+
|
|
107
|
+
arch = x86_64-linux
|
|
108
|
+
sitearch = $(arch)
|
|
109
|
+
ruby_version = 2.7.0
|
|
110
|
+
ruby = $(bindir)/$(RUBY_BASE_NAME)
|
|
111
|
+
RUBY = $(ruby)
|
|
112
|
+
ruby_headers = $(hdrdir)/ruby.h $(hdrdir)/ruby/backward.h $(hdrdir)/ruby/ruby.h $(hdrdir)/ruby/defines.h $(hdrdir)/ruby/missing.h $(hdrdir)/ruby/intern.h $(hdrdir)/ruby/st.h $(hdrdir)/ruby/subst.h $(arch_hdrdir)/ruby/config.h
|
|
113
|
+
|
|
114
|
+
RM = rm -f
|
|
115
|
+
RM_RF = $(RUBY) -run -e rm -- -rf
|
|
116
|
+
RMDIRS = rmdir --ignore-fail-on-non-empty -p
|
|
117
|
+
MAKEDIRS = /usr/bin/mkdir -p
|
|
118
|
+
INSTALL = /usr/bin/install -c
|
|
119
|
+
INSTALL_PROG = $(INSTALL) -m 0755
|
|
120
|
+
INSTALL_DATA = $(INSTALL) -m 644
|
|
121
|
+
COPY = cp
|
|
122
|
+
TOUCH = exit >
|
|
123
|
+
|
|
124
|
+
#### End of system configuration section. ####
|
|
125
|
+
|
|
126
|
+
preload =
|
|
127
|
+
libpath = . $(libdir)
|
|
128
|
+
LIBPATH = -L. -L$(libdir) -Wl,-rpath,$(libdir)
|
|
129
|
+
DEFFILE =
|
|
130
|
+
|
|
131
|
+
CLEANFILES = mkmf.log
|
|
132
|
+
DISTCLEANFILES =
|
|
133
|
+
DISTCLEANDIRS =
|
|
134
|
+
|
|
135
|
+
extout =
|
|
136
|
+
extout_prefix =
|
|
137
|
+
target_prefix = /Yk
|
|
138
|
+
LOCAL_LIBS =
|
|
139
|
+
LIBS = -lstdc++ -lm -lc
|
|
140
|
+
ORIG_SRCS = stl_set_tz_ruby.cpp tree_tz.cc tz_stl_auto.cpp
|
|
141
|
+
SRCS = $(ORIG_SRCS)
|
|
142
|
+
OBJS = stl_set_tz_ruby.o tree_tz.o tz_stl_auto.o
|
|
143
|
+
HDRS = $(srcdir)/stl_map_tz.h $(srcdir)/stl_multimap_tz.h $(srcdir)/stl_multiset_tz.h $(srcdir)/stl_set_tz.h $(srcdir)/stl_tree_tz.h
|
|
144
|
+
LOCAL_HDRS =
|
|
145
|
+
TARGET = ESet
|
|
146
|
+
TARGET_NAME = ESet
|
|
147
|
+
TARGET_ENTRY = Init_$(TARGET_NAME)
|
|
148
|
+
DLLIB = $(TARGET).so
|
|
149
|
+
EXTSTATIC =
|
|
150
|
+
STATIC_LIB =
|
|
151
|
+
|
|
152
|
+
TIMESTAMP_DIR = .
|
|
153
|
+
BINDIR = $(bindir)
|
|
154
|
+
RUBYCOMMONDIR = $(sitedir)$(target_prefix)
|
|
155
|
+
RUBYLIBDIR = $(sitelibdir)$(target_prefix)
|
|
156
|
+
RUBYARCHDIR = $(sitearchdir)$(target_prefix)
|
|
157
|
+
HDRDIR = $(rubyhdrdir)/ruby$(target_prefix)
|
|
158
|
+
ARCHHDRDIR = $(rubyhdrdir)/$(arch)/ruby$(target_prefix)
|
|
159
|
+
TARGET_SO_DIR =
|
|
160
|
+
TARGET_SO = $(TARGET_SO_DIR)$(DLLIB)
|
|
161
|
+
CLEANLIBS = $(TARGET_SO)
|
|
162
|
+
CLEANOBJS = *.o *.bak
|
|
163
|
+
|
|
164
|
+
all: $(DLLIB)
|
|
165
|
+
static: $(STATIC_LIB)
|
|
166
|
+
.PHONY: all install static install-so install-rb
|
|
167
|
+
.PHONY: clean clean-so clean-static clean-rb
|
|
168
|
+
|
|
169
|
+
clean-static::
|
|
170
|
+
clean-rb-default::
|
|
171
|
+
clean-rb::
|
|
172
|
+
clean-so::
|
|
173
|
+
clean: clean-so clean-static clean-rb-default clean-rb
|
|
174
|
+
-$(Q)$(RM) $(CLEANLIBS) $(CLEANOBJS) $(CLEANFILES) .*.time
|
|
175
|
+
|
|
176
|
+
distclean-rb-default::
|
|
177
|
+
distclean-rb::
|
|
178
|
+
distclean-so::
|
|
179
|
+
distclean-static::
|
|
180
|
+
distclean: clean distclean-so distclean-static distclean-rb-default distclean-rb
|
|
181
|
+
-$(Q)$(RM) Makefile $(RUBY_EXTCONF_H) conftest.* mkmf.log
|
|
182
|
+
-$(Q)$(RM) core ruby$(EXEEXT) *~ $(DISTCLEANFILES)
|
|
183
|
+
-$(Q)$(RMDIRS) $(DISTCLEANDIRS) 2> /dev/null || true
|
|
184
|
+
|
|
185
|
+
realclean: distclean
|
|
186
|
+
install: install-so install-rb
|
|
187
|
+
|
|
188
|
+
install-so: $(DLLIB) $(TIMESTAMP_DIR)/.sitearchdir.-.Yk.time
|
|
189
|
+
$(INSTALL_PROG) $(DLLIB) $(RUBYARCHDIR)
|
|
190
|
+
clean-static::
|
|
191
|
+
-$(Q)$(RM) $(STATIC_LIB)
|
|
192
|
+
install-rb: pre-install-rb do-install-rb install-rb-default
|
|
193
|
+
install-rb-default: pre-install-rb-default do-install-rb-default
|
|
194
|
+
pre-install-rb: Makefile
|
|
195
|
+
pre-install-rb-default: Makefile
|
|
196
|
+
do-install-rb:
|
|
197
|
+
do-install-rb-default:
|
|
198
|
+
pre-install-rb-default:
|
|
199
|
+
@$(NULLCMD)
|
|
200
|
+
$(TIMESTAMP_DIR)/.sitearchdir.-.Yk.time:
|
|
201
|
+
$(Q) $(MAKEDIRS) $(@D) $(RUBYARCHDIR)
|
|
202
|
+
$(Q) $(TOUCH) $@
|
|
203
|
+
|
|
204
|
+
site-install: site-install-so site-install-rb
|
|
205
|
+
site-install-so: install-so
|
|
206
|
+
site-install-rb: install-rb
|
|
207
|
+
|
|
208
|
+
.SUFFIXES: .c .m .cc .mm .cxx .cpp .o .S
|
|
209
|
+
|
|
210
|
+
.cc.o:
|
|
211
|
+
$(ECHO) compiling $(<)
|
|
212
|
+
$(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -c $(CSRCFLAG)$<
|
|
213
|
+
|
|
214
|
+
.cc.S:
|
|
215
|
+
$(ECHO) translating $(<)
|
|
216
|
+
$(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -S $(CSRCFLAG)$<
|
|
217
|
+
|
|
218
|
+
.mm.o:
|
|
219
|
+
$(ECHO) compiling $(<)
|
|
220
|
+
$(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -c $(CSRCFLAG)$<
|
|
221
|
+
|
|
222
|
+
.mm.S:
|
|
223
|
+
$(ECHO) translating $(<)
|
|
224
|
+
$(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -S $(CSRCFLAG)$<
|
|
225
|
+
|
|
226
|
+
.cxx.o:
|
|
227
|
+
$(ECHO) compiling $(<)
|
|
228
|
+
$(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -c $(CSRCFLAG)$<
|
|
229
|
+
|
|
230
|
+
.cxx.S:
|
|
231
|
+
$(ECHO) translating $(<)
|
|
232
|
+
$(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -S $(CSRCFLAG)$<
|
|
233
|
+
|
|
234
|
+
.cpp.o:
|
|
235
|
+
$(ECHO) compiling $(<)
|
|
236
|
+
$(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -c $(CSRCFLAG)$<
|
|
237
|
+
|
|
238
|
+
.cpp.S:
|
|
239
|
+
$(ECHO) translating $(<)
|
|
240
|
+
$(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -S $(CSRCFLAG)$<
|
|
241
|
+
|
|
242
|
+
.c.o:
|
|
243
|
+
$(ECHO) compiling $(<)
|
|
244
|
+
$(Q) $(CC) $(INCFLAGS) $(CPPFLAGS) $(CFLAGS) $(COUTFLAG)$@ -c $(CSRCFLAG)$<
|
|
245
|
+
|
|
246
|
+
.c.S:
|
|
247
|
+
$(ECHO) translating $(<)
|
|
248
|
+
$(Q) $(CC) $(INCFLAGS) $(CPPFLAGS) $(CFLAGS) $(COUTFLAG)$@ -S $(CSRCFLAG)$<
|
|
249
|
+
|
|
250
|
+
.m.o:
|
|
251
|
+
$(ECHO) compiling $(<)
|
|
252
|
+
$(Q) $(CC) $(INCFLAGS) $(CPPFLAGS) $(CFLAGS) $(COUTFLAG)$@ -c $(CSRCFLAG)$<
|
|
253
|
+
|
|
254
|
+
.m.S:
|
|
255
|
+
$(ECHO) translating $(<)
|
|
256
|
+
$(Q) $(CC) $(INCFLAGS) $(CPPFLAGS) $(CFLAGS) $(COUTFLAG)$@ -S $(CSRCFLAG)$<
|
|
257
|
+
|
|
258
|
+
$(TARGET_SO): $(OBJS) Makefile
|
|
259
|
+
$(ECHO) linking shared-object Yk/$(DLLIB)
|
|
260
|
+
-$(Q)$(RM) $(@)
|
|
261
|
+
$(Q) $(LDSHAREDXX) -o $@ $(OBJS) $(LIBPATH) $(DLDFLAGS) $(LOCAL_LIBS) $(LIBS)
|
|
262
|
+
|
|
263
|
+
|
|
264
|
+
|
|
265
|
+
###
|
|
266
|
+
stl_set_tz_ruby.o: stl_set_tz_ruby.cpp set_tz
|
|
267
|
+
tree_tz.o: tree_tz.cc stl_tree_tz.h
|
data/ext/Yk/depend
ADDED
data/ext/Yk/extconf.rb
ADDED
data/ext/Yk/for_yard.rb
ADDED
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
#!/usr/bin/env ruby
|
|
2
|
+
|
|
3
|
+
fw = File.open "for_yard_product.rb", "w"
|
|
4
|
+
fw.write <<EPRE
|
|
5
|
+
# namespace Yk
|
|
6
|
+
module Yk
|
|
7
|
+
EPRE
|
|
8
|
+
%W{ESet EMSet EMap EMMap}.each do |c|
|
|
9
|
+
fw.write <<END
|
|
10
|
+
#{
|
|
11
|
+
case(c)
|
|
12
|
+
when "ESet"
|
|
13
|
+
"# ESets are containers with external iterators that store unique elements following a specific order. For use, require 'Yk/ESet';include Yk;\n"
|
|
14
|
+
when "EMSet"
|
|
15
|
+
"# EMSets are containers with external iterators that store elements following a specific order, and where multiple elements can have equivalent values. For use, require 'Yk/ESet';include Yk;\n"
|
|
16
|
+
when "EMap"
|
|
17
|
+
"# EMaps are associative containers with external iterators that store elements formed by a combination of a key and a value, following a specific order. For use, require 'Yk/ESet';include Yk;\n"
|
|
18
|
+
when "EMMap"
|
|
19
|
+
"# EMMaps are associative containers with external iterators that store elements formed by a combination of a key and a value, following a specific order, and where multiple elements can have equivalent keys. For use, 'Yk/ESet';include Yk;\n"
|
|
20
|
+
end
|
|
21
|
+
}class #{c}
|
|
22
|
+
# initlialize with a block which returns comparing basis like Enumerable::sort_by, however using <, not <=>.
|
|
23
|
+
#{
|
|
24
|
+
case(c)
|
|
25
|
+
when "ESet", "EMSet"
|
|
26
|
+
" # @yieldparam [Object] obj object pointed by an element.\n"
|
|
27
|
+
else
|
|
28
|
+
" # @yieldparam [Object] key object pointed by an element.\n"
|
|
29
|
+
end
|
|
30
|
+
} # @yieldreturn [Object] should be comparable with method, '<'.
|
|
31
|
+
def initialize
|
|
32
|
+
end
|
|
33
|
+
# @return [#{c}::Iterator] Return iterator to beginning
|
|
34
|
+
def begin
|
|
35
|
+
end
|
|
36
|
+
# @return [#{c}::Iterator] Return iterator to end
|
|
37
|
+
def end
|
|
38
|
+
end
|
|
39
|
+
# @return [Integer] Return container size
|
|
40
|
+
def size
|
|
41
|
+
end
|
|
42
|
+
# Clear content
|
|
43
|
+
def clear
|
|
44
|
+
end
|
|
45
|
+
# @return [#{c}::Iterator] Return iterator to upper bound
|
|
46
|
+
def upper_bound
|
|
47
|
+
end
|
|
48
|
+
# @return [#{c}::Iterator] Return iterator to lower bound
|
|
49
|
+
def lower_bound
|
|
50
|
+
end
|
|
51
|
+
#{
|
|
52
|
+
case(c)
|
|
53
|
+
when "ESet", "EMSet"
|
|
54
|
+
" # @overload insert(position, obj)\n"
|
|
55
|
+
when "EMap", "EMMap"
|
|
56
|
+
" # @overload insert(position, key, value)\n"
|
|
57
|
+
end
|
|
58
|
+
} # Insert element with an object using a hint
|
|
59
|
+
# @param [#{c}::Iterator] position Hint for the position where the element can be inserted.
|
|
60
|
+
#{
|
|
61
|
+
case(c)
|
|
62
|
+
when "ESet", "EMSet"
|
|
63
|
+
" # @param [Object] obj Object to be pointed by the inserted elements.\n"
|
|
64
|
+
when "EMap", "EMMap"
|
|
65
|
+
" # @param [Object] key key object to be pointed by the inserted elements.\n" +
|
|
66
|
+
" # @param [Object] value value object to be pointed by the inserted elements.\n"
|
|
67
|
+
end
|
|
68
|
+
}#{
|
|
69
|
+
case(c)
|
|
70
|
+
when "ESet", "EMap"
|
|
71
|
+
" # @return [#{c}::Iterator] An iterator pointing to either the newly inserted element or to the element that already had its equivalent in the container.\n"
|
|
72
|
+
else
|
|
73
|
+
" # @return [#{c}::Iterator] An iterator pointing to either the newly inserted element.\n"
|
|
74
|
+
end
|
|
75
|
+
}#{
|
|
76
|
+
case(c)
|
|
77
|
+
when "ESet", "EMSet"
|
|
78
|
+
" # @overload insert(obj)\n"
|
|
79
|
+
when "EMap", "EMMap"
|
|
80
|
+
" # @overload insert(key, value)\n"
|
|
81
|
+
end
|
|
82
|
+
} # Insert element with an object
|
|
83
|
+
#{
|
|
84
|
+
case(c)
|
|
85
|
+
when "ESet", "EMSet"
|
|
86
|
+
" # @param [Object] obj key object to be pointed by the inserted elements.\n"
|
|
87
|
+
when "EMap", "EMMap"
|
|
88
|
+
" # @param [Object] key key object to be pointed by the inserted elements.\n" +
|
|
89
|
+
" # @param [Object] value value object to be pointed by the inserted elements.\n"
|
|
90
|
+
end
|
|
91
|
+
}#{
|
|
92
|
+
case(c)
|
|
93
|
+
when "ESet", "EMap"
|
|
94
|
+
" # @return [Array] An array, with its first member set to an iterator pointing to either the newly inserted element or to the equivalent element already in the set. The second member in the array is set to true if a new element was inserted or false if an equivalent element already existed.\n"
|
|
95
|
+
else
|
|
96
|
+
" # @return [#{c}::Iterator] An iterator pointing to either the newly inserted element.\n"
|
|
97
|
+
end
|
|
98
|
+
} def insert *args
|
|
99
|
+
end
|
|
100
|
+
END
|
|
101
|
+
fw.flush
|
|
102
|
+
if c == "EMap"
|
|
103
|
+
fw.write <<FOR_EMAP
|
|
104
|
+
# @overload insert_or_assign(k, v)
|
|
105
|
+
# If a key equivalent to 'k' already exists in the container, assigns 'v' to value corresponding to the key. If the key does not exist, inserts the new value as if by insert.
|
|
106
|
+
# @param [Object] k key object
|
|
107
|
+
# @param [Object] v value object
|
|
108
|
+
# @return [Array] An array, with its first member set to an iterator pointing to either the newly inserted element or to the equivalent element already in the set. The second member in the array is set to true if a new element was inserted or false if an equivalent element already existed.
|
|
109
|
+
# @overload insert_or_assign(position, k, v)
|
|
110
|
+
# Insert element with key and value using a hint
|
|
111
|
+
# @param [#{c}::Iterator] position Hint for the position where the element can be inserted.
|
|
112
|
+
# @param [Object] k key object
|
|
113
|
+
# @param [Object] v value object
|
|
114
|
+
# @return [#{c}::Iterator] Iterator pointing at the element that was inserted or updated
|
|
115
|
+
def insert_or_assign *args
|
|
116
|
+
end
|
|
117
|
+
FOR_EMAP
|
|
118
|
+
end
|
|
119
|
+
fw.flush
|
|
120
|
+
fw.write <<END2
|
|
121
|
+
# Removes from the set container a range of elements ([first,last)).
|
|
122
|
+
# Iterators specifying a range within the set container to be removed: [first,last). i.e., the range includes all the elements between first and last, including the element pointed by first but not the one pointed by last.
|
|
123
|
+
# @param [#{c}::Iterator] first first iterator.
|
|
124
|
+
# @param [#{c}::Iterator] last last iterator.
|
|
125
|
+
# @raise ArgumentError raised when an argument is not a compatible iterator.
|
|
126
|
+
# @raise ArgumentError raised when first and last iterators are not from the same container.
|
|
127
|
+
# @raise RangeError raised when erasing end iterator
|
|
128
|
+
def erase first, last
|
|
129
|
+
end
|
|
130
|
+
# Searches the container for an element with an object equivalent to the third argument and/or validated with the provided block in a range of elements ([first,last)), 'obj' and returns an iterator to it if found, otherwise it returns an iterator to .
|
|
131
|
+
# @param [#{c}::Iterator] first first iterator.
|
|
132
|
+
# @param [#{c}::Iterator] last last iterator.
|
|
133
|
+
# @param obj Object to search equivalency.
|
|
134
|
+
# @yieldparam [Object] obj object argument pointed by an element passed for validation with the block
|
|
135
|
+
# @yieldreturn [Object] validation result from the block
|
|
136
|
+
# @return [#{c}::Iterator] iterator pointing the element with equivalent object.
|
|
137
|
+
# @raise ArgumentError raised when an argument is not a compatible iterator.
|
|
138
|
+
# @raise ArgumentError raised when first and last iterators are not from the same container.
|
|
139
|
+
# @raise ArgumentError raised when neither parameter, obj nor block is provided.
|
|
140
|
+
# @raise RangeError raised when dereferencing end iterator
|
|
141
|
+
def #{c}.find first, last, obj = nil
|
|
142
|
+
end
|
|
143
|
+
# Applies given block to each of the elements in the range [first,last).
|
|
144
|
+
# @param [#{c}::Iterator] first first iterator.
|
|
145
|
+
# @param [#{c}::Iterator] last last iterator.
|
|
146
|
+
# @yieldparam [Object] obj object in an element
|
|
147
|
+
# @raise ArgumentError raised when an argument is not a compatible iterator.
|
|
148
|
+
# @raise ArgumentError raised when first and last iterators are not from the same container.
|
|
149
|
+
def #{c}.for_each first, last
|
|
150
|
+
end
|
|
151
|
+
# Iterator class, pointing an element in container
|
|
152
|
+
class Iterator
|
|
153
|
+
# increment the position
|
|
154
|
+
# @return [#{c}::Iterator] self
|
|
155
|
+
# @raise RangeError raised when advancing over the end
|
|
156
|
+
def inc
|
|
157
|
+
end
|
|
158
|
+
# decrement the position
|
|
159
|
+
# @return [#{c}::Iterator] self
|
|
160
|
+
# @raise RangeError raised when rewinding over the beginning
|
|
161
|
+
def dec
|
|
162
|
+
end
|
|
163
|
+
# compare for equivalence of positions
|
|
164
|
+
# @return true or false
|
|
165
|
+
# @raise ArgumentError raised in case right operand is not compatible
|
|
166
|
+
def == arg
|
|
167
|
+
end
|
|
168
|
+
# compare for unequivalence of positions
|
|
169
|
+
# @return true or false
|
|
170
|
+
# @raise ArgumentError raised in case right operand is not compatible
|
|
171
|
+
def !=
|
|
172
|
+
end
|
|
173
|
+
#{
|
|
174
|
+
case(c)
|
|
175
|
+
when "ESet", "EMSet"
|
|
176
|
+
" # dereference the iterator, and returns the pointed object\n" +
|
|
177
|
+
" # @return [Object] The pointed object\n"
|
|
178
|
+
when "EMap", "EMMap"
|
|
179
|
+
" # dereference the iterator, and returns the key object and the value object\n" +
|
|
180
|
+
" # @return [Array] Array of the pointed key object and value object\n"
|
|
181
|
+
end
|
|
182
|
+
} def item
|
|
183
|
+
end
|
|
184
|
+
end
|
|
185
|
+
end
|
|
186
|
+
END2
|
|
187
|
+
fw.flush
|
|
188
|
+
end
|
|
189
|
+
fw.write "\nend # module Yk\n"
|
|
190
|
+
fw.close
|
|
191
|
+
|
|
192
|
+
system "yardoc for_yard_product.rb -o ../../docs"
|