Reads a component and all its owned components from the reader object's stream.
Do not call ReadRootComponent directly. It is used internally by the component streaming system. When the reader object is created by its stream in the stream's ReadComponent method, it immediately calls the ReadRootComponent method, which initiates the streaming sequence of restoring an object.
ReadRootComponent first calls the ReadSignature method to ensure that it is reading a proper component. ReadRootComponent also handles initializations and fixup references. For example, the component passed in Root becomes the value of the Root property for the reader object.
ReadRootComponent calls the component's ReadState method, which calls back to the reader's ReadData method. The ReadState method of TComponent is virtual, which allows component classes to override ReadState to prepare themselves for being loaded with the new data from the stream.
Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!