Archived
1

Reorganized File Structure

Added Documentation
This commit is contained in:
Kim Wittenburg
2014-12-12 00:39:30 +01:00
parent c367b1dbe8
commit 8f1f730358
90 changed files with 1270 additions and 1216 deletions

View File

@@ -0,0 +1,57 @@
//
// MPExpressionElement.h
// MathPad
//
// Created by Kim Wittenburg on 10.08.14.
// Copyright (c) 2014 Kim Wittenburg. All rights reserved.
//
/*!
@protocol MPExpressionElement
@brief This protocol defines the functionality an element in an
expression must have.
*/
@protocol MPExpressionElement <NSObject, NSCopying, NSCoding>
/*!
@method isString
@brief Returns wether the receiver is a string.
@discussion A string is defined by being an instance of @c NSString. If this
method returns @c YES you can be sure it is an @c NSString
instance.
@return @c YES if the receiver is a string, @c NO otherwise.
*/
- (BOOL)isString;
/*!
@method isFunction
@brief Returns wether the receiver is a function.
@discussion A function is defined by being an instance of @c MPFunction. If
this method returns @c YES you can be sure it is a @c MPFunction
instance.
@return @c YES if the receiver is a function, @c NO otherwise.
*/
- (BOOL)isFunction;
/*!
@method length
@brief Calculates the length of the receiver.
@discussion The length of a @c MPExpressionElement is the number of symbols
it consists of. For strings this is the number of characters in
it. Functions have a length of @c 1.
@return The receiver's length.
*/
- (NSUInteger)length;
@end