ObjectStore C++ API Reference

os_member_function

class os_member_function : public os_member
This class is part of the ObjectStore metaobject protocol, which provides access to ObjectStore schemas. Instances of this class represent member functions. os_member_function is derived from os_member.

The types os_int32 and os_boolean, used throughout this manual, are each defined as a signed 32-bit integer type. The type os_unsigned_int32 is defined as an unsigned 32-bit integer type.

Programs using this class must include <ostore/ostore.hh>, followed by <ostore/coll.hh> (if used), followed by <ostore/mop.hh>.

os_member_function::create()

static os_member_function& create(
      const char* name, 
      os_function_type*
);
Creates a member function with the specified name and of the specified type.

os_member_function::get_call_linkage()

os_call_linkage get_call_linkage() const;
Returns os_member_function::No_linkage, os_member_function::C_linkage, os_member_function::C_plus_plus_linkage, or os_member_function::Fortran_linkage.

os_member_function::get_function_kind()

enum os_function_kind { 
      Regular,
      /* applicable only if it is a member function */
      Constructor, Destructor, 
      Cast_op, /* the return type gives the cast type */
      /* the operators that can be overloaded */
      New_op, Delete_op,
      Plus_op, Minus_op, Mul_op, Div_op, Mod_op,
      Xor_op, And_op, Or_op, Comp_op,
      Not_op, Assign_op, Lt_op, Gt_op,
      Plus_assign_op, Minus_assign_op, Mul_assign_op,
      Div_assign_op, Mod_assign_op,
      Xor_assign_op, And_assign_op, Or_assign_op,
      Lsh_op, Rsh_op, 
      Lsh_assign_op, Rsh_assign_op,
      Eq_op, Neq_op, Le_op, Ge_op,
      And_and_op, Or_or_op,
      Inc_op, Dec_op, Comma_op,
      Member_deref_op, Deref_op,
      Paren_op, Subscript_op, 
      Vec_new_op, Vec_delete_op
};
os_function_kind get_function_kind() const;
Returns an enumerator indicating what kind of function the specified member function is.

os_member_function::get_name()

const char *get_name() const;
Returns the name of the specified member.

os_member_function::get_source_position()

void get_source_position(
      const char* &file, 
      os_unsigned_int32 &line
) const;
Returns the source position associated with the specified function.

os_member_function::get_type()

const os_function_type &get_type() const;
Returns an os_function_type&, which contains information about the function, including its return type and argument list.

os_member_function::is_const()

os_boolean is_const() const;
Returns nonzero if and only if the specified member function is const.

os_member_function::is_inline()

os_boolean is_inline() const;
Returns nonzero if and only if the specified member function is inline.

os_member_function::is_overloaded()

os_boolean is_overloaded() const;
Returns nonzero if and only if the specified member function is overloaded.

os_member_function::is_pure_virtual()

os_boolean is_pure_virtual() const;
Returns nonzero if and only if the specified member function is pure virtual.

os_member_function::is_static()

os_boolean is_static() const;
Returns nonzero if and only if the specified member function is static.

os_member_function::is_virtual()

os_boolean is_virtual() const;
Returns nonzero if and only if the specified member function is virtual.

os_member_function::is_volatile()

os_boolean is_volatile() const;
Returns nonzero if and only if the specified member function is volatile.

os_member_function::set_call_linkage()

void set_call_linkage(os_call_linkage);
Pass os_member_function::No_linkage, os_member_function::C_linkage, os_member_function::C_plus_plus_linkage, or os_member_function::Fortran_linkage.

os_member_function::set_is_const()

void set_is_const(os_boolean);
1 specifies that the member function is const; 0 specifies that it is non-const.

os_member_function::set_is_inline()

void set_is_inline(os_boolean);
1 specifies that the member function is inline; 0 specifies that it is not inline.

os_member_function::set_is_overloaded()

void set_is_overloaded(os_boolean);
1 specifies that the member function is overloaded; 0 specifies that it is not.

os_member_function::set_is_pure_virtual()

void set_is_pure_virtual(os_boolean);
1 specifies that the member function is a pure virtual function; 0 specifies that it is not.

os_member_function::set_is_static()

void set_is_static(os_boolean);
1 specifies that the member function is a static function; 0 specifies that it is not.

os_member_function::set_is_virtual()

void set_is_virtual(os_boolean);
1 specifies that the member function is a virtual function; 0 specifies that it is not.

os_member_function::set_is_volatile()

void set_is_volatile(os_boolean);
1 specifies that the member function is volatile; 0 specifies that it is not.

os_member_function::set_name()

void set_name(const char* name);
Sets the name of the specified member.

os_member_function::set_source_position()

void set_source_position(
      const char* file, 
      os_unsigned_int32 line
);
Sets the source position associated with the specified function.

os_member_function::set_type()

void set_type(os_function_type&);
Sets the return type of the specified member function.



[previous] [next]

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

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