[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Monotone-devel] dumb question - node::clone()
From: |
Timothy Brownawell |
Subject: |
Re: [Monotone-devel] dumb question - node::clone() |
Date: |
Sun, 24 Jun 2007 20:19:00 -0500 |
On Sun, 2007-06-24 at 10:30 -0700, Zack Weinberg wrote:
> Do the clone() methods for dir_node and file_node do anything that the
> respective copy constructors wouldn't do?
They're virtual functions, which means that you can call clone() on a
node* (which will actually point to a dir_node or file_node), and get a
new dir_node or file_node as appropriate. Using a copy constructor
directly means that you have to know in advance what type you're trying
to get.
--
Timothy
Free (experimental) public monotone hosting: http://mtn-host.prjek.net