ECParameterString


Discussion

This class expects format strings like e.g.
"Here is variableA=${variableA} and here is variable=${variableB}"
In conjunction with a current set of parameter values this class substitutes the placeholders accordingly and returns a standard NSString implementation.

It is important that the hand-off format string does notcontain any formatting characters (see NSString). It may only contain parameters! But the values of a parameter may contain formatting characters...

Note: At present the implementation only allows the usage of up to (not necessarely unique) variables in a format string.



Methods

-initWithFormat
-initWithFormat:parameterEvaluater:
-parseFormatString:
internal method used to parse the specified format string
-substituteVariables
Using the current variable binding this method substitutes all variables by their assigned values.

initWithFormat


See Also:
initWithFormat:parameterEvaluater:
- initWithFormat: (NSString *) aFormatString parameterEvaluater: (id <ECParameterEvaluater>) aParameterEvaluater;
Parameter Descriptions
aFormatString
string containing variables which have to be substituted. It is important that the hand-off format string does notcontain any formatting characters (see NSString). It may only contain parameters!
aParameterEvaluator
used to bind the variabes. The binding will not be performed with this call.
method result
self

initWithFormat:parameterEvaluater:


See Also:
initWithFormat
- initWithFormat: (NSString *) aFormatString parameterEvaluater: (id <ECParameterEvaluater>) aParameterEvaluater;
Parameter Descriptions
aFormatString
string containing variables which have to be substituted. It is important that the hand-off format string does notcontain any formatting characters (see NSString). It may only contain parameters!
aParameterEvaluator
used to bind the variabes. The binding will not be performed with this call.

parseFormatString:


internal method used to parse the specified format string

- parseFormatString: (NSString *) aFormatString;
Parameter Descriptions
aFormatString
format string given by method -init
method result
self
Discussion

modifies the internal variable


substituteVariables


Using the current variable binding this method substitutes all variables by their assigned values.

- (NSString *) substituteVariables;
method result
resulting string
Discussion

The binding of the variables, that is the evaluation on behalf of the ECParameterEvaluater instance is done when calling this method. Up to this time variables may be changed etc. But when calling this method all bindings must have been done so far.

(Last Updated August 27, 2006)