在delphi7的classes单元看到TBits和TRecall类,他们都直接继承自TObject.想知道他们怎么用.查下帮助,发现如下英文如下:没看明白.
有哪位老师用过这两个类或知道用在什么地方,还望不吝赐教!最好能举例小例子.
下面是TBits
Use TBits to store and access an indefinite number of boolean values. TBits can store as many of boolean values as can fit in available memory, automatically expanding its storage space as needed. If the number of boolean values is limited to 32, the same functionality can be achieved using a 32-bit integer with the bitwise AND (Delphi) or & (C++) and OR (Delphi) or | (C++) operators.下面是TRecall
TRecall acts as a temporary repository for the properties of a persistent object. To use TRecall1. Create an instance of TRecall, assigning an object to use for storing property values (the storage object), and an object whose property values it represents (the reference object). When you create an instance of TRecall, it automatically stores the current properties of the reference object.
2. Call the Store method at any time to take a snapshot of the reference object's properties. TRecall updates the storage object so that it reflects only the property settings from the last time you called the Store method (or, if Store was never called, from the point when the TRecall object was created).3. Delete the TRecall object to restore the reference object to the set of properties it had when you last called the Store method.If you do not want the TRecall object to restore the properties it is saving, call the Forget method. After you call Forget, the TRecall object can't be used. It does not update the reference object when destroyed and can't save any more properties.You can use TRecall to save the properties of any persistent object, using any explicitly specified storage object. In addition, TRecall has several descendants with their own built-in storage objects that work only with a specific class of reference object. These include TFontRecall, TPenRecall, and TBrushRecall.