--------------------------------------------------------------------- CLASS: CmrDiff --trp PUBLIC METHODS: beginDir() Is called by the driver representation to define a new dir. endDir() Is called by the driver representation to end current dir. file() Is called by the driver representation to define a new file. symlink() Is called by the driver representation to define a new symlink. USAGE NOTES: For validation, "driver" directory entries are compared to "rider" entries. At the time of this programming, an n-ary tree representation is used for comparision. However in order to provide for flexible class use, two function pointers to application functions provide access to the "rider" directory tree representation. CmrDiff receives a begin directory function call from the reader, and constructs a new ValDirectory object for that directory. To avoid storing all information for that directory and child directories in a recursive data structure, it is assumed that the "rider" has ad hoc access, and thus all entries for that directory are stored into the rider entries list immediately. "driver" entries for this directory will be accrued throughout subsequent cmr reader returns. ---------------------------------------------------------------------- --------------------------------------------------------------------- METHOD: CmrDiff::beginDir --trp Sets up difference work for a new directory. In the case of root, the name & attributes are immediately checked. ARGS: void* parent IN driver dir parent, or NULL for root char* dirName IN driver dir name, or "/" for root Attributes& attr IN driver dir attributes RETURNS: void data pointer to application domain directory node. PRE-CONDITIONS: the member is called for root on the first instance only parent is non null for non-root dirName is "/" for root, and root only POST-CONDITIONS: if root, root is validated against the rider root node if not root, the directory is inserted into the top dirStack_ ValDirectory riderEntries_ sorted list all rider child entries are inserted into a new ValDirectory riderEntries_ sorted list the new ValDirectory object is pushed into the member dirStack_ ERRORS: NOTES: ---------------------------------------------------------------------- void* CmrDiff::beginDir(void *parent, char *dirName, Attributes& attr) --------------------------------------------------------------------- METHOD: CmrDiff::endDir --trp Performs difference work on the current completed directory. ARGS: void* parent IN driver dir parent, or NULL for root char* dirName IN driver dir name, or "/" for root Attributes& attr IN driver dir attributes RETURNS: void data pointer to application domain directory node. PRE-CONDITIONS: the member is called for root on the first instance only parent is non null for non-root dirName is "/" for root, and root only POST-CONDITIONS: if root, root is validated against the rider root node if not root, the directory is inserted into the top dirStack_ ValDirectory riderEntries_ sorted list all rider child entries are inserted into a new ValDirectory riderEntries_ sorted list the new ValDirectory object is pushed into the member dirStack_ ERRORS: NOTES: ---------------------------------------------------------------------- void CmrDiff::endDir(void *closingDir) --------------------------------------------------------------------- METHOD: CmrDiff::file --trp Collect file information for difference checking. ARGS: char* fileName IN file name, from the reader Attributes& attr IN file attributes, from the reader ExtentList& elist IN file extent list, from the reader RETURNS: void PRE-CONDITIONS: POST-CONDITIONS: The current file is insert into the directory stack top ValDirectory object sorted driverEntries list. ERRORS: NOTES: The actual difference check is performed in endDir. ---------------------------------------------------------------------- void CmrDiff::file(char *fileName, Attributes& attr, ExtentList& elist) --------------------------------------------------------------------- METHOD: CmrDiff::symlink --trp Collect difference checking information for a symlink. ARGS: char* symlinkName name of symlink, from reader Attributes& attr symlink attributes, from reader PathElementList& plist symlink plist, from reader RETURNS: void PRE-CONDITIONS: POST-CONDITIONS: The current symlink is insert into the directory stack top ValDirectory object sorted driverEntries list. ERRORS: NOTES: ---------------------------------------------------------------------- void CmrDiff::symlink(char *symlinkName, Attributes& attr, PathElementList& plist)