ObjectStore C++ API Reference

os_template

This class is part of the ObjectStore metaobject protocol, which provides access to ObjectStore schemas. Instances of this class represent (type or function) templates. os_type_template and os_function_template are derived from os_template.

os_template::Function

This enumerator is a possible return value from os_template::get_kind(), indicating a function template.

os_template::get_args()

os_List<const os_template_formal_arg*> get_args() const;
Returns a list (in declaration order) of the formal arguments of the specified template. Each element of the list is a pointer to a const os_template_formal_arg.

os_template::get_kind()

enum os_template_kind { Type, Function } ;
os_template_kind get_kind() const;
Returns an enumerator indicating whether the specified template is a type template or a function template. The possible return values are os_template::Type and os_template::Function.

os_template::is_unspecified()

os_boolean is_unspecified() const;
Returns nonzero (that is, true) if and only if the specified os_template is the unspecified template. Some os_template-valued attributes in the metaobject protocol are required to have values in a consistent schema, but might lack values in the transient schema, before schema installation or evolution is performed. The get function for such an attribute returns a reference to an os_template. The fact that a reference rather than pointer is returned indicates that the value is required in a consistent schema. In the transient schema, if such an attribute lacks a value (because you have not yet specified it), the get function returns the unspecified template. This is the only os_template for which is_unspecified() returns nonzero.

os_template::operator const os_type_template&()

operator const os_type_template&() const;
Provides for safe conversion to const os_type_template. If the specified os_template is not an os_type_template, err_mop_illegal_cast is signaled.

os_template::operator os_type_template&()

operator os_type_template&();
Provides for safe conversion to os_type_template. If the specified os_template is not an os_type_template, err_mop_illegal_cast is signaled.

os_template::set_args()

void set_args(os_List<os_template_formal_arg*>&);
Specifies the list (in declaration order) of the formal arguments of the specified template. Each element of the list is a pointer to an os_template_formal_arg.

os_template::Type

This enumerator is a possible return value from os_template::get_kind(), indicating a type template.



[previous] [next]

Copyright © 1997 Object Design, Inc. All rights reserved.

Updated: 03/31/98 17:25:09