KCMS CMM Developer's Guide

Save Methods

KcsProfile includes two types of save()() methods: a blind save and an I/O-basedsave.

The blind save()() method saves the profile to the current location. No arguments are required and the timelastsaved attribute is set. The iFormat save()() is called. (iFormat is a pointer to the KcsProfileFormat instance in the KcsProfile base class. See "KcsProfileFormat Instance" for details.) The KcsProfileFormat class saves the profile (with iFormat) because only that class knows the content of the data.

The I/O-based save()() method constructs a new chunk set by

  1. Replacing the one currently there

  2. Doing a blind save to the new chunk set

  3. Resetting everything back

This save method also creates an empty profile by calling the createEmptyProfile()() method.

Since the I/O-based save means save the data to something different, or something new, save()() must reset all the default data to a loadable empty profile with no attributes and no transformations.

All load()() and save()() methods are based on chunk sets. All chunk sets are based on I/O objects. Therefore, indirectly, save()() uses the I/O object to get its data from static store. See Chapter 4, KcsIO Derivative ," for details.

The I/O-based save()() is not virtual because it just wraps around the virtual blind save()() method.