DATASERV (kdataman) functions


LIBRARY ROUTINE

kdms_create_attribute - instantiate an attribute

LIBRARY CALL

int kdms_create_attribute(
      kobject  object,
      char    *segment,
      char    *attribute,
      int      numargs,
      int      argsize,
      int      datatype,
      int      permanent,
      int      shared)

INPUT

OUTPUT

none

RETURN VALUE

TRUE (1) on success, FALSE (0) otherwise

DESCRIPTION

This routine provides the programmer with a mechanism for creating attributes specific to a program being written.

The attribute acts as storage for multiple argument values. Each attribute argument can be of any size or data type. The number of arguments, the argument size, and the data type are all specified here.

The attributes can be either created on the main object (object-level) or created on any of the object's data segments (segment-level). Whether the attribute is created at the object-level or at the segment-level is determined by the segment argument. If the segment argument is NULL, then the attribute will be instantiated at the object-level. Otherwise, the attribute will be instantiated on the specified segment, if it exists. If an attribute with the same name and scope already exists, then this function will fail.

The attribute can be either permanent or transient. Permanent impiles that when the object is closed, a representation of the attribute will be written out to the disk.

In addition to being created either at the object or segment level, the attribute can also be created at the physical or presentation level.

Changes to physical level attributes are visible to all references of the data object and are termed as "shared" attributes. Changes to presentation level attributes are visible only to the reference object on which the change was made, and thus the attribute is termed as "unshared". Since all references may have potentially different values, unshared attributes may not be permanent.

An initial value must be provided. This initial value must consist of the proper number of arguments where each argument is of the same size and data type specified in this call.

The attribute can be destroyed with the kdms_destroy_attribute function.

ADDITIONAL INFORMATION

none

EXAMPLES

none

SIDE EFFECTS

none

RESTRICTIONS

This attribute will override any defined attributes with the same name and scope.

MODIFICATION

none

FILES

$DATASERV/objects/library/kdataman/src/attributes.c

SEE ALSO

kdataman(3)

COPYRIGHT

Copyright (C) 1993 - 1997, Khoral Research, Inc. ("KRI") All rights reserved.