Class: AtCoderFriends::Generator::CxxBuiltin
- Defined in:
- lib/at_coder_friends/generator/cxx_builtin.rb
Overview
generates C++ source from problem description
Constant Summary collapse
- TEMPLATE =
File.join(TMPL_DIR, 'cxx_builtin.cxx.erb')
- ATTRS =
Attributes.new(:cxx, TEMPLATE, FRAGMENTS)
Constants inherited from CBuiltin
AtCoderFriends::Generator::CBuiltin::ACF_HOME, AtCoderFriends::Generator::CBuiltin::FRAGMENTS, AtCoderFriends::Generator::CBuiltin::TMPL_DIR
Constants inherited from Base
Base::ACF_HOME, Base::TMPL_DIR
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
- #attrs ⇒ Object
- #gen_const(c) ⇒ Object
-
#render(src) ⇒ Object
deprecated, use ERB syntax.
Methods included from InputFragmentMixin
Methods included from DeclFragmentMixin
Methods included from ConstFragmentMixin
Methods inherited from Base
#config_file_ext, #config_fragments, #config_template, #embed_lines, #fragments, #generate, #initialize, #process
Constructor Details
This class inherits a constructor from AtCoderFriends::Generator::Base
Instance Method Details
#attrs ⇒ Object
10 11 12 |
# File 'lib/at_coder_friends/generator/cxx_builtin.rb', line 10 def attrs ATTRS end |
#gen_const(c) ⇒ Object
14 15 16 |
# File 'lib/at_coder_friends/generator/cxx_builtin.rb', line 14 def gen_const(c) ConstFragment.new(c, fragments['cxx_constant']).generate end |
#render(src) ⇒ Object
deprecated, use ERB syntax
19 20 21 22 23 |
# File 'lib/at_coder_friends/generator/cxx_builtin.rb', line 19 def render(src) src = (src, '/*** CONSTS ***/', gen_consts) src = (src, '/*** DCLS ***/', gen_decls) (src, '/*** INPUTS ***/', gen_inputs) end |