Contents
Navigation
Home User Reference Other Resources


The QTPlgDictionary class, and its derived classes, provides a convenient mechanism to deal with collections of QTPlugin objects.

Even if its name could remind to you of the RealBasic dictionary class, and the use of value–key pairs could appear to confirm it, the QTPlgDictionary class is quite different. It is based on the concept of QuickTime atom container that is a basic structure for storing information in QuickTime. An atom container is a tree–structured hierarchy of entities called QT atoms. You can think of a newly created QT atom container as the root of a tree structure that contains no children; this is valid for an instance of the QTPlgDictionary class as well.

At time, the class defines the property that lets you store/retrieve objects from the container but does not provide any implementation of this property; it is up to the QTPlgDictionary’s derived classes to provide an appropriate implementation of this property. Both the type of object and key values that can be used depend on the specific class implementation; however, whatever is the property implementation, the key will always be an integer value.

Since version 6.7 of the plugin this class can be used in Console Applications






The QTPlgDictionary class constructors are called when you create a new instance of the class, while the ˜QTPlgDictionary class destructor, is called automatically when the class is no more in use. Also, you can invoke the class destructor by setting the instance of the class to nil.

Once a new class instance is returned, it is good practice to check the class property to be sure that the new object can be used. A QTPlgDictionary object is valid if it refers to a valid atom container structure (that is the value of the property is not 0).


The class provides you with the following initializer methods:
()
This is the default constructor. Use this constructor version to create a new empty atom container structure
(other as QTPlgDictionary)
This is the copy constructor. The properties of the object to be copied will be used to initialize the new class instance properties

a reference to the QT atom container structure. useful for toolbox programmers (use with care: you could invalidate the reference causing unpredictable results (probably an application crash))
indicates the number of objects in the dictionary
indicates if the dictionary does not contain any object
retrieve the value of the key that corresponds to the specified index i; values for index range from 0 to –1
retrieve the object that corresponds to the specified key. Both the type of object and the key values that can be accepted depend on the QTPlgDictionary’s derived class that implement this property
retrieve the object that corresponds to the specified key. Both the type of object and the key values that can be accepted depend on the QTPlgDictionary’s derived class that implement this property. This property differs from the previous one in that the result is a reference to the object; this implies that you are modifying the real container object, not a copy of it. Furthermore, this means that the object instance will be valid until the source container it is

(key as integer) as boolean
use this method to find about the existence of a given key into the dictionary. The key values that can be accepted depend on the QTPlgDictionary’s derived class
returns true if the key has been found, otherwise returns false. You can check the class property for errors
(key as integer)
use this method to remove from the dictionary the object associated to the specified key. The key values that can be accepted depend on the QTPlgDictionary’s derived class
returns nothing. You can check the class property for errors
()
use this method to remove from the dictionary any stored object
returns nothing. You can check the class property for errors
(src as QTPlgDictionary)
use this method to copy the content of the dictionary specified by the src parameter; any object previously stored will be removed before copying
returns nothing. You can check the class property for errors
(dst as folderitem)
use this function to dump the content of the dictionary as text to the file specified by the dst parameter; if the target file already exist, the method will replace it with a completely new one. The QTPlgDictionary class outputs a very basic description of the dictionary content, but its derived classes can override this method to provide more accurate details about their content. This being the case, the documentation of the class will provide more details about the type of output produced
returns nothing. You can check the class property for errors
(dst as folderitem)
use this function to dump the content of the dictionary as xml formatted text to the file specified by the dst parameter; if the target file already exist, the method will replace it with a completely new one. The QTPlgDictionary class outputs a very basic description of the dictionary content, but its derived classes can override this method to provide more accurate details about their content. This being the case, the documentation of the class will provide more details about the type of output produced
returns nothing. You can check the class property for errors
(dst as folderitem)
use this function to dump the content of the dictionary as binary data to the file specified by the dst parameter; if the target file already exist, the method will replace it with a completely new one.
returns nothing. You can check the class property for errors