value_incapsulator.rb

Path: lib/rucodegen/value_incapsulator.rb
Last Update: Mon Jun 04 14:34:32 +0400 2007

Required files

set   rucodegen/generators   rucodegen/filename_producer  

Methods

Public Instance methods

Функция для определения экземпляра ValueIncapsulator.

Вызывает переданный функции блок кода с одним параметром - объектом RuCodeGen::ValueIncapsulator.

Аргументы:

a_name
имя генерируемого класса;

[Source]

# File lib/rucodegen/value_incapsulator.rb, line 309
def cpp_value_incapsulator(
                a_name,
                &blk ) # :yields: c
        vi = RuCodeGen::ValueIncapsulator.new( a_name )
        blk.call( vi )

        fail "decl_file not specified" if nil == vi.get_decl_file
        fail "impl_file not specified" if nil == vi.get_impl_file

        RuCodeGen::Generators.add(
                        RuCodeGen::FilenameProducer.produce(
                                        $0, vi.get_decl_file ),
                        RuCodeGen::ValueIncapsulator::Generation::
                                        DeclGenerator.new( vi ) )
        RuCodeGen::Generators.add(
                        RuCodeGen::FilenameProducer.produce(
                                        $0, vi.get_impl_file ),
                        RuCodeGen::ValueIncapsulator::Generation::
                                        ImplGenerator.new( vi ) )

        vi
end

[Validate]

Hosted by uCoz