contexttools.ContextMark

Inheritance diagram of abjad.tools.contexttools.ContextMark.ContextMark.ContextMark

class abjad.tools.contexttools.ContextMark.ContextMark.ContextMark(target_context=None)[source]

New in version 2.0.

Abstract class from which concrete context marks inherit:

abjad> note = Note("c'4")
abjad> contexttools.ContextMark()(note)
ContextMark()(c'4)

Context marks override __call__ to attach to Abjad components.

Context marks implement __slots__.

Read-only Properties

ContextMark.effective_context[source]

Read-only reference to effective context of context mark:

abjad> note = Note("c'4")
abjad> context_mark = contexttools.ContextMark()(note)
abjad> context_mark.effective_context is None
True

Return context mark or none.

ContextMark.start_component

Read-only reference to mark start component:

abjad> note = Note("c'4")
abjad> mark = marktools.Mark()(note)
abjad> mark.start_component
Note("c'4")

Return component or none.

Note

Inherited from marktools.Mark

ContextMark.target_context[source]

Read-only reference to target context of context mark:

abjad> note = Note("c'4")
abjad> context_mark = contexttools.ContextMark()(note)
abjad> context_mark.target_context is None
True

Return context mark or none.

Methods

ContextMark.attach(start_component)[source]

Make sure no context mark of same type is already attached to start component.

ContextMark.detach()[source]

Detach mark:

abjad> note = Note("c'4")
abjad> context_mark = contexttools.ContextMark()(note)
abjad> context_mark.start_component
Note("c'4")
abjad> context_mark.detach()
ContextMark()
abjad> context_mark.start_component is None
True

Return context mark.

Special Methods

ContextMark.__call__(*args)

Note

Inherited from marktools.Mark

ContextMark.__delattr__(*args)

Note

Inherited from marktools.Mark

ContextMark.__eq__(arg)

Note

Inherited from marktools.Mark

ContextMark.__ge__(arg)

Abjad objects by default do not implement this method.

Raise exception.

Note

Inherited from abctools.AbjadObject

ContextMark.__gt__(arg)

Abjad objects by default do not implement this method.

Raise exception

Note

Inherited from abctools.AbjadObject

ContextMark.__hash__() <==> hash(x)

Note

Inherited from __builtin__.object

ContextMark.__le__(arg)

Abjad objects by default do not implement this method.

Raise exception.

Note

Inherited from abctools.AbjadObject

ContextMark.__lt__(arg)

Abjad objects by default do not implement this method.

Raise exception.

Note

Inherited from abctools.AbjadObject

ContextMark.__ne__(arg)

Note

Inherited from marktools.Mark

ContextMark.__repr__()

Note

Inherited from marktools.Mark

ContextMark.__setattr__()

x.__setattr__(‘name’, value) <==> x.name = value

Note

Inherited from __builtin__.object

ContextMark.__str__() <==> str(x)

Note

Inherited from __builtin__.object

Table Of Contents

This Page