mav_objectNew - Create a new object.

[ Maverik Level 1 functions ]

#

mav_objectNew

## Summary

Create a new object.

## Syntax

MAV_object *mav_objectNew(MAV_class *c, void *d);

- MAV_class *c
  Class of object.

- void *d
  Pointer to data associated with the object.

## Description

This function creates a new object. It encapsulates in a single data structure (the resultant MAV_object) the methods defined by class `c`, and the data defined by `d`. MAV_object's acts as generic handle to any object, regardless of class, and is used as the argument to other Maverik functions.

The MAV_object created by this function contains a reference to -- not a copy of -- the data and class. This means that if the data or class change in the future, the relevant MAV_object(s) do not need to be notified.

## See also

MAV_object.html>MAV_object, mav_objectDelete.html>mav_objectDelete, mav_objectDataGet.html>mav_objectDataGet, mav_objectClassGet.html>mav_objectClassGet, mav_objectDataWith.html>mav_objectDataWith

Back to the index page.