Logo Search packages:      
Sourcecode: scummvm version File versions  Download package

virtual AbstractFilesystemNode* AbstractFilesystemNode::getChild ( const String name  )  const [protected, pure virtual, inherited]

Returns the child node with the given name. If no child with this name exists, returns 0. When called on a non-directory node, it should handle this gracefully by returning 0.

Example: Calling getChild() for a node with path "/foo/bar" using name="file.txt", would produce a new node with "/foo/bar/file.txt" as path.

Note:
This function will append a separator char (\ or /) to the end of the path if needed.

Handling calls on non-dir nodes gracefully makes it possible to switch to a lazy type detection scheme in the future.

Parameters:
name String containing the name of the child to create a new node.

Implemented in DS::DSFileSystemNode, DS::GBAMPFileSystemNode, and Ps2FilesystemNode.

Referenced by FilesystemNode::getChild().


Generated by  Doxygen 1.6.0   Back to index