Max 5 API Reference

Data Storage

Max provides a number of ways of storing and manipulating data at a high level. More...

Collaboration diagram for Data Storage:

Modules

 Atom Array
 

Max's atomarray object is a container for an array of atoms with an interface for manipulating that array.


 Database
 

Max's database support currently consists of a SQLite ( http://sqlite.org ) extension which is loaded dynamically by Max at launch time.


 Dictionary
 

In Max 5, we have a new "dictionary" object which can be used for object prototypes, object serialization, object constructors, and other tasks.


 Hash Table
 

Max's hashtab object implements a hash table ( http://en.wikipedia.org/wiki/Hash_table ).


 Index Map
 

An indexmap is basically a managed array of pointers, but it allows you to derive relatively quickly the index from a pointer in the array.


 Linked List
 

Max's linklist object implements a doubly-linked-list ( http://en.wikipedia.org/wiki/Linked_list ) together with a high-level interface for manipulating and accessing values in the list.


 Quick Map
 

A quickmap implements a pair of t_hashtab hash tables so that it is fast to look up a unique value for a unique key or vice-versa.


 String Object
 

Max's string object is a simple wrapper for c-strings, useful when working with Max's t_dictionary, t_linklist, or t_hashtab.


 Symbol Object
 

The symobject class is a simple object that wraps a t_symbol* together with a couple of additional fields.


Typedefs

typedef long(* t_cmpfn )(void *, void *)
 Comparison function pointer type.

Enumerations

enum  e_max_datastore_flags {
  OBJ_FLAG_OBJ = 0x00000000,
  OBJ_FLAG_REF = 0x00000001,
  OBJ_FLAG_DATA = 0x00000002,
  OBJ_FLAG_MEMORY = 0x00000004,
  OBJ_FLAG_SILENT = 0x00000100,
  OBJ_FLAG_INHERITABLE = 0x00000200
}
 

Flags used in linklist and hashtab objects.

More...

Detailed Description

Max provides a number of ways of storing and manipulating data at a high level.

It is recommended to use Max's data storage mechanisms where possible, as Max's systems are designed for thread-safety and integration with the rest of Max API.


Typedef Documentation

typedef long(* t_cmpfn)(void *, void *)

Comparison function pointer type.

Methods that require a comparison function pointer to be passed in use this type. It should return true or false depending on the outcome of the comparison of the two linklist items passed in as arguments.

See also:
linklist_match()
hashtab_findfirst()
indexmap_sort()

Enumeration Type Documentation

Flags used in linklist and hashtab objects.

Enumerator:
OBJ_FLAG_OBJ 

free using object_free()

OBJ_FLAG_REF 

don't free

OBJ_FLAG_DATA 

don't free data or call method

OBJ_FLAG_MEMORY 

don't call method, and when freeing use sysmem_freeptr() instead of freeobject

OBJ_FLAG_SILENT 

don't notify when modified

OBJ_FLAG_INHERITABLE 

obexprototype entry will be inherited by subpatchers and abstractions

Copyright © 2008, Cycling '74