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 ( i.e.


 Dictionary
 

Max 5, introduced the t_dictionary structure/object.


 Hash Table
 

A hash table is a data structure that associates some data with a unique key.


 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
 

The Max t_linklist data structure is useful for maintaining ordered lists of items where you want to be able to insert and delete items efficiently.


 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.


 Dictionary Passing API
 

The Dictionary Passing API defines a means by which t_dictionary instances may be passed between Max objects in a way similar to the way Jitter Matrices are passed between objects.


Typedefs

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

Enumerations

enum  e_max_datastore_flags {
  OBJ_FLAG_OBJ, OBJ_FLAG_REF, OBJ_FLAG_DATA, OBJ_FLAG_MEMORY,
  OBJ_FLAG_SILENT, OBJ_FLAG_INHERITABLE, OBJ_FLAG_ITERATING, OBJ_FLAG_DEBUG
}
 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

OBJ_FLAG_ITERATING 

used by linklist to signal when is inside iteration

OBJ_FLAG_DEBUG 

context-dependent flag, used internally for linklist debug code