Bookshelf Home | Contents | Index | PDF |
Siebel eScript Language Reference > Siebel eScript Commands > BLOB Objects > The blobDescriptor ObjectThe blobDescriptor Object describes the structure of the BLOB. When an object needs to be sent to a process other than the Siebel eScript interpreter, such as to a Windows API function, a blobDescriptor object must be created that describes the order and type of data in the object. This description tells how the properties of the object are stored in memory and is used with functions like Clib.fread() and SElib.dynamicLink(). A blobDescriptor has the same data properties as the object it describes. Each property must be assigned a value that specifies how much memory is required for the data held by that property. The keyword "this" is used to refer to the parameters passed to the constructor function and can be conceptually thought of as "this object." Consider the following object: Rectangle(width, height) The following code creates a blobDescriptor object that describes the Rectangle object: var bd = new blobDescriptor(); You can now pass bd as a blobDescriptor parameter to functions that require one. The values assigned to the properties depend on what the receiving function expects. In the preceding example, the function that is called expects to receive an object that contains two 32-bit words or data values. If you write a blobDescriptor for a function that expects to receive an object containing two 16-bit words, assign the two properties a value of UWORD16. One of the following values must be used with blobDescriptor object properties to indicate the number of bytes needed to store the property: If the blobDescriptor describes an object property that is a string, the corresponding property should be assigned a numeric value that is larger than the length of the longest string the property may hold. Object methods usually may be omitted from a blobDescriptor. BlobDescriptors are used primarily for passing eScript's JavaScript-like data structures to C or C++ programs and to the Clib methods, which expect a very rigid and precise description of the values being passed. |
Siebel eScript Language Reference |