63 lines
1.7 KiB
Objective-C
63 lines
1.7 KiB
Objective-C
//
|
|
// MPSumTerm.h
|
|
// MathPad
|
|
//
|
|
// Created by Kim Wittenburg on 14.11.14.
|
|
// Copyright (c) 2014 Kim Wittenburg. All rights reserved.
|
|
//
|
|
|
|
#import "MPTerm.h"
|
|
|
|
|
|
/*!
|
|
@header
|
|
This file contains the <code>MPSumTerm</code> class.
|
|
*/
|
|
|
|
|
|
|
|
@class MPSumTerm;
|
|
|
|
|
|
/*!
|
|
@class MPSumTerm
|
|
@abstract A sum term consists of n terms that are added together.
|
|
|
|
@discussion Although they are added in order of occurrence the child terms
|
|
should be considered having equal priority.
|
|
*/
|
|
@interface MPSumTerm : MPTerm
|
|
|
|
/*!
|
|
@method initWithSummands:
|
|
@abstract Initializes a new sum term with the specified <code>summands</code>.
|
|
|
|
@discussion There is very little checking performed during initialization.
|
|
All objects in the specified array must be valid instances of
|
|
subclasses of <code>@link //apple_ref/occ/cl/MPTerm@/link</code>.
|
|
The array must contain at least one object.
|
|
|
|
@param summands
|
|
The summands the sum term should be initialized with. The array
|
|
must not be <code>nil</code> and must contain at least one
|
|
object. The contents of the array are not copied, the array
|
|
itself however is.
|
|
|
|
@return A new sum term.
|
|
*/
|
|
- (instancetype)initWithSummands:(NSArray *)summands; /* designated initializer */
|
|
|
|
|
|
/*!
|
|
@property summands
|
|
@abstract The receiver's summands.
|
|
|
|
@discussion This property is guaranteed to be non <code>nil</code>. The
|
|
contents of the array are specified during initialization of the
|
|
receiver.
|
|
*/
|
|
@property (readonly, nonatomic, copy) NSArray *summands;
|
|
|
|
@end
|
|
|