File: instance_reader.rb

package info (click to toggle)
puppet-agent 7.23.0-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 19,092 kB
  • sloc: ruby: 245,074; sh: 456; makefile: 38; xml: 33
file content (19 lines) | stat: -rw-r--r-- 976 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
module Puppet::Pops
module Serialization
  # An InstanceReader is responsible for reading an instance of a complex object using a deserializer. The read involves creating the
  # instance, register it with the deserializer (so that self references can be resolved) and then read the instance data (which normally
  # amounts to all attribute values).
  # Instance readers are registered with of {Types::PObjectType}s to aid the type when reading instances.
  #
  # @api private
  module InstanceReader
    # @param [Class] impl_class the class of the instance to be created and initialized
    # @param [Integer] value_count the expected number of objects that forms the initialization data
    # @param [Deserializer] deserializer the deserializer to read from, and to register the instance with
    # @return [Object] the instance that has been read
    def read(impl_class, value_count, deserializer)
      Serialization.not_implemented(self, 'read')
    end
  end
end
end