Common Lisp Package: CAMBL

README:

FUNCTION

Public

AMOUNT-COMMODITY (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

AMOUNT-KEEP-PRECISION-P (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

AMOUNT-QUANTITY (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

ANNOTATION-DATE (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

ANNOTATION-PRICE (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

ANNOTATION-TAG (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

COMMODITY-EQUAL (A B)

Two commodities are EQUAL if they are the same object.

COMMODITY-LESSP (LEFT RIGHT)

Return T if commodity LEFT should be sorted before RIGHT.

FIND-ANNOTATED-COMMODITY (NAME-OR-COMMODITY DETAILS &KEY (CREATE-IF-NOT-EXISTS-P NIL) (POOL *DEFAULT-COMMODITY-POOL*))

Find an annotated commodity matching the commodity symbol NAME, which may be a STRING or a COMMODITY-SYMBOL, and given set of commodity DETAILS, of type COMMODITY-ANNOTATION. Returns two values: COMMODITY or NIL, NEWLY-CREATED-P

FIND-COMMODITY (NAME &KEY (CREATE-IF-NOT-EXISTS-P NIL) (POOL *DEFAULT-COMMODITY-POOL*))

Find a COMMODITY identifier by the symbol name found by parsing NAME. The NAME can be either a string or an input stream, or nil, in which case the name is read from *STANDARD-INPUT*. The argument :POOL specifies the commodity pool which will maintain this commodity, and by which other code may access it again. The argument :CREATE-IF-NOT-EXISTS-P indicates whether a new commodity should be created if one cannot already be found. The return values are: COMMODITY or NIL, NEWLY-CREATED-P

GET-AMOUNTS-MAP (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

READ-AMOUNT (IN &KEY (OBSERVE-PROPERTIES-P T) (POOL *DEFAULT-COMMODITY-POOL*))

Parse an AMOUNT from the input IN, which may be a stream or string. If :OBSERVE-PROPERTIES-P is T (the default), any display details noticed in this amount will be set as defaults for displaying this kind of commodity in the future. If :POOL is set, any commodities created by this routine (a maximum possible of two, if an annotated price is given with a second commodity) will be associated with the given commodity pool. The possible syntax for an amount is: [-]NUM[ ]SYM [ANNOTATION] SYM[ ][-]NUM [ANNOTATION]

SIGN (AMOUNT)

Return -1, 0 or 1 depending on the sign of AMOUNT.

SIGN* (AMOUNT)

Return -1, 0 or 1 depending on the sign of AMOUNT.

VALUE-ROUND (AMOUNT &OPTIONAL PRECISION)

Round the given AMOUNT to the stated PRECISION. If PRECISION is less than the current internal precision, data will be lost. If it is greater, this operation has no effect.

Undocumented

AMOUNT (STRING &KEY (POOL *DEFAULT-COMMODITY-POOL*))

AMOUNT* (STRING &KEY (POOL *DEFAULT-COMMODITY-POOL*))

SETFAMOUNT-COMMODITY (NEW-VALUE INSTANCE)

AMOUNT-IN-BALANCE (BALANCE COMMODITY)

SETFAMOUNT-KEEP-PRECISION-P (NEW-VALUE INSTANCE)

AMOUNT-P (OBJECT)

SETFAMOUNT-QUANTITY (NEW-VALUE INSTANCE)

ANNOTATED-COMMODITY-P (OBJECT)

SETFANNOTATION-DATE (NEW-VALUE INSTANCE)

SETFANNOTATION-PRICE (NEW-VALUE INSTANCE)

SETFANNOTATION-TAG (NEW-VALUE INSTANCE)

BALANCE-AMOUNTS (BALANCE)

BALANCE-COMMODITIES (BALANCE)

BALANCE-COMMODITY-COUNT (BALANCE)

BALANCE-FIRST-AMOUNT (BALANCE)

BALANCE-P (OBJECT)

COMMODITY-BUILTIN-P (COMM)

COMMODITY-EQUALP (A B)

COMMODITY-NO-MARKET-PRICE-P (COMM)

COMMODITY-POOL (COMM)

COMMODITY-PRICE-HISTORY (COMM)

COMMODITY-THOUSAND-MARKS-P (COMM)

COMPARE-AMOUNTS-VISUALLY (LEFT RIGHT)

EXACT-AMOUNT (STRING &KEY (POOL *DEFAULT-COMMODITY-POOL*))

EXCHANGE-COMMODITY (AMOUNT &KEY (TOTAL-COST NIL) (PER-UNIT-COST NIL) (MOMENT NIL) (TAG NIL))

SETFGET-AMOUNTS-MAP (NEW-VALUE INSTANCE)

MAKE-COMMODITY-ANNOTATION (&KEY ((PRICE DUM201) NIL) ((DATE DUM202) NIL) ((TAG DUM203) NIL))

MAKE-COMMODITY-POOL (&KEY ((BY-NAME-MAP DUM113) (MAKE-HASH-TABLE TEST 'EQUAL)) ((DEFAULT-COMMODITY DUM114) NIL))

PARSE-AMOUNT (&REST ARGS)

PARSE-AMOUNT* (&REST ARGS)

READ-AMOUNT* (IN &KEY (POOL *DEFAULT-COMMODITY-POOL*))

READ-EXACT-AMOUNT (IN &KEY (POOL *DEFAULT-COMMODITY-POOL*))

RESET-COMMODITY-POOL (&OPTIONAL POOL)

VALUE-GREATEREQP (LEFT RIGHT)

VALUE-GREATEREQP* (LEFT RIGHT)

VALUE-GREATERP (LEFT RIGHT)

VALUE-GREATERP* (LEFT RIGHT)

VALUE-LESSEQP (LEFT RIGHT)

VALUE-LESSEQP* (LEFT RIGHT)

VALUE-LESSP (LEFT RIGHT)

VALUE-LESSP* (LEFT RIGHT)

VALUE-MAYBE-ROUND (AMOUNT)

VALUE< (LEFT RIGHT)

VALUE<= (LEFT RIGHT)

VALUE> (LEFT RIGHT)

VALUE>= (LEFT RIGHT)

VALUEP (OBJECT)

Private

COMMODITY-POOL-BY-NAME-MAP (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

COMMODITY-POOL-DEFAULT-COMMODITY (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

COMMODITY-SYMBOL-CONNECTED-P (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

COMMODITY-SYMBOL-NAME (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

COMMODITY-SYMBOL-NEEDS-QUOTING-P (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

COMMODITY-SYMBOL-PREFIXED-P (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

CREATE-ANNOTATED-COMMODITY (COMMODITY DETAILS QUALIFIED-NAME)

Create an ANNOTATED-COMMODITY which annotates COMMODITY. The NAME can be either a string or a COMMODITY-SYMBOL.

CREATE-COMMODITY (NAME &KEY (POOL *DEFAULT-COMMODITY-POOL*))

Create a COMMODITY after the symbol name found by parsing NAME. The NAME can be either a string or an input stream, or nil, in which case the name is read from *STANDARD-INPUT*. The argument :pool specifies the commodity pool which will maintain this commodity, and by which other code may access it again. The resulting COMMODITY object is returned.

FIND-NEAREST (IT ROOT &KEY (TEST #'<=) (KEY #'IDENTITY))

Find an item in the tree which is closest to IT according to TEST. For the default, <=, this means no other item will be more less than IT in the tree than the one found.

FORMAT-COMMODITY-ANNOTATION (ANNOTATION &KEY (OUTPUT-STREAM *STANDARD-OUTPUT*))

Return the canonical annotation string for ANNOTATION. A fully annotated commodity always follows the form: [-]SYMBOL <VALUE> {PRICE} [DATE] (TAG) or <VALUE> SYMBOL {PRICE} [DATE] (TAG) If a particular annotation is not present, those sections is simply dropped from the string, for example: <VALUE> SYMBOL {PRICE}

PRICING-ENTRY-MOMENT (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

PRICING-ENTRY-PRICE (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

READ-COMMODITY-SYMBOL (IN)

Parse a commodity symbol from the input stream IN. This is the correct entry point for creating a new commodity symbol. A commodity contain any character not found in *INVALID-SYMBOL-CHARS*. To include such characters in a symbol name---except for #\", which may never appear in a symbol name---surround the commodity name with double quotes. It is an error if EOF is reached without reading the ending double quote. If the symbol name is not quoted, and an invalid character is reading, reading from the stream stops and the invalid character is put back.

SYMBOL-NAME-NEEDS-QUOTING-P (NAME)

Return T if the given symbol NAME requires quoting.

Undocumented

ADD-PRICE (COMMODITY PRICE &OPTIONAL FIXED-TIME)

APPLY-BETWEEN-AMOUNTS (LEFT RIGHT FUNCTION &OPTIONAL ADJUSTOR)

APPLY-BETWEEN-BALANCES (LEFT RIGHT FUNCTION &OPTIONAL ADJUSTOR)

APPLY-TO-BALANCE (BALANCE COMMODITY VALUE FUNCTION &OPTIONAL ADJUSTOR)

BALANCE (&REST AMOUNTS)

BALANCE-EQUAL (LEFT RIGHT TEST-FUNC)

BALANCE-HELPER (LEFT RIGHT)

COMMODITY-ANNOTATION-P (OBJECT)

COMMODITY-COMMENT (COMM)

COMMODITY-DESCRIPTION (COMM)

SETFCOMMODITY-POOL-BY-NAME-MAP (NEW-VALUE INSTANCE)

SETFCOMMODITY-POOL-DEFAULT-COMMODITY (NEW-VALUE INSTANCE)

COMMODITY-POOL-P (OBJECT)

COMMODITY-SYMBOL (COMM)

SETFCOMMODITY-SYMBOL-CONNECTED-P (NEW-VALUE INSTANCE)

SETFCOMMODITY-SYMBOL-NAME (NEW-VALUE INSTANCE)

SETFCOMMODITY-SYMBOL-NEEDS-QUOTING-P (NEW-VALUE INSTANCE)

COMMODITY-SYMBOL-P (OBJECT)

SETFCOMMODITY-SYMBOL-PREFIXED-P (NEW-VALUE INSTANCE)

COPY-AMOUNT (INSTANCE)

COPY-BALANCE (INSTANCE)

COPY-COMMODITY-ANNOTATION (INSTANCE)

COPY-COMMODITY-POOL (INSTANCE)

COPY-COMMODITY-SYMBOL (INSTANCE)

COPY-PRICING-ENTRY (INSTANCE)

DIVIDE-IN-BALANCE (BALANCE COMMODITY VALUE)

MAKE-AMOUNT (&KEY ((COMMODITY DUM283) NIL) ((QUANTITY DUM284) 0) ((KEEP-PRECISION-P DUM285) NIL))

MAKE-BALANCE (&KEY ((AMOUNTS-MAP DUM372) NIL))

MAKE-COMMODITY-SYMBOL (&KEY ((NAME DUM0) ) ((NEEDS-QUOTING-P DUM1) NIL) ((PREFIXED-P DUM2) NIL) ((CONNECTED-P DUM3) NIL))

MAKE-PRICING-ENTRY (&KEY ((MOMENT DUM4329) NIL) ((PRICE DUM4330) NIL))

MAKE-QUALIFIED-NAME (COMMODITY COMMODITY-ANNOTATION)

MULTIPLY-IN-BALANCE (BALANCE COMMODITY VALUE)

PEEK-CHAR-IN-LINE (IN &OPTIONAL SKIP-WHITESPACE)

SETFPRICING-ENTRY-MOMENT (NEW-VALUE INSTANCE)

PRICING-ENTRY-P (OBJECT)

SETFPRICING-ENTRY-PRICE (NEW-VALUE INSTANCE)

READ-AMOUNT-QUANTITY (IN)

READ-COMMODITY-ANNOTATION (IN)

READ-UNTIL (IN CHAR &OPTIONAL ERROR-MESSAGE)

REMOVE-PRICE (COMMODITY FIXED-TIME)

SYMBOL-CHAR-INVALID-P (C)

VERIFY-AMOUNTS (LEFT RIGHT CAPITALIZED-GERUND)

MACRO

Public

Undocumented

PUSHEND (ITEM THE-LIST &OPTIONAL FINAL-CONS)

Private

Undocumented

DEFINE-COMMODITY-ACCESSOR (FUNCTION ACCESSOR)

TRANSFORM-BALANCE (BALANCE PREDICATE FUNCTION &KEY (FIRST-ONLY NIL) (SKIP-TO-NEXT T) (LOOKAHEAD NIL))

GENERIC-FUNCTION

Public

Undocumented

ADD (VALUE-A VALUE-B)

ANNOTATE-COMMODITY (ITEM ANNOTATION)

COMMODITY-ANNOTATION (ITEM)

COMMODITY-ANNOTATION-EQUAL (LEFT-ITEM RIGHT-ITEM)

COMMODITY-NAME (ITEM &OPTIONAL NO-ANNOTATION)

COMPARE (LEFT RIGHT)

COMPARE* (LEFT RIGHT)

DISPLAY-PRECISION (ITEM)

DIVIDE (VALUE-A VALUE-B)

FORMAT-VALUE (VALUE &KEY OMIT-COMMODITY-P FULL-PRECISION-P WIDTH LATTER-WIDTH LINE-FEED-STRING (WIDTH NIL))

MARKET-VALUE (ANY-ITEM &OPTIONAL FIXED-TIME)

MULTIPLY (VALUE-A VALUE-B)

NEGATE (VALUE)

STRIP-ANNOTATIONS (ANY-ITEM &KEY KEEP-PRICE KEEP-DATE KEEP-TAG)

SUBTRACT (VALUE-A VALUE-B)

VALUE-ABS (VALUE)

VALUE-EQUAL (LEFT RIGHT)

VALUE-EQUALP (LEFT RIGHT)

VALUE-MINUSP (VALUE)

VALUE-MINUSP* (VALUE)

VALUE-NOT-EQUAL (LEFT RIGHT)

VALUE-NOT-EQUALP (LEFT RIGHT)

VALUE-PLUSP (VALUE)

VALUE-PLUSP* (VALUE)

VALUE-ZEROP (VALUE)

VALUE-ZEROP* (VALUE)

VALUE/= (LEFT RIGHT)

VALUE= (LEFT RIGHT)

Private

Undocumented

COMMODITY-ANNOTATION-EMPTY-P (ITEM)

ERROR-COMMODITY (CONDITION)

ERROR-DESCRIPTION (CONDITION)

ERROR-OPERANDS (CONDITION)

SLOT-ACCESSOR

Public

Undocumented

COMMODITY-QUALIFIED-NAME (OBJECT)

SETFCOMMODITY-QUALIFIED-NAME (NEW-VALUE OBJECT)

Private

Undocumented

GET-BUILTIN-P (OBJECT)

SETFGET-BUILTIN-P (NEW-VALUE OBJECT)

GET-COMMENT (OBJECT)

SETFGET-COMMENT (NEW-VALUE OBJECT)

GET-COMMODITY-ANNOTATION (OBJECT)

SETFGET-COMMODITY-ANNOTATION (NEW-VALUE OBJECT)

GET-COMMODITY-POOL (OBJECT)

SETFGET-COMMODITY-POOL (NEW-VALUE OBJECT)

GET-DESCRIPTION (OBJECT)

SETFGET-DESCRIPTION (NEW-VALUE OBJECT)

GET-DISPLAY-PRECISION (OBJECT)

SETFGET-DISPLAY-PRECISION (NEW-VALUE OBJECT)

GET-NO-MARKET-PRICE-P (OBJECT)

SETFGET-NO-MARKET-PRICE-P (NEW-VALUE OBJECT)

GET-PRICE-HISTORY (OBJECT)

SETFGET-PRICE-HISTORY (NEW-VALUE OBJECT)

GET-REFERENT (OBJECT)

SETFGET-REFERENT (NEW-VALUE OBJECT)

GET-SYMBOL (OBJECT)

SETFGET-SYMBOL (NEW-VALUE OBJECT)

GET-THOUSAND-MARKS-P (OBJECT)

SETFGET-THOUSAND-MARKS-P (NEW-VALUE OBJECT)

VARIABLE

Public

Undocumented

*DEFAULT-COMMODITY-POOL*

Private

*INVALID-SYMBOL-CHARS*

The invalid commodity symbol characters are: Space Tab Newline Return 0-9 . , ; - + * / ^ ? : & | ! = " < > { } [ ] ( ) @

Undocumented

*DEFAULT-DISPLAY-PRECISION*

CLASS

Public

Undocumented

AMOUNT (STRING &KEY (POOL *DEFAULT-COMMODITY-POOL*))

ANNOTATED-COMMODITY

COMMODITY-ANNOTATION (ITEM)

COMMODITY-POOL (COMM)

Private

Undocumented

BALANCE (&REST AMOUNTS)

COMMODITY

COMMODITY-SYMBOL (COMM)

PRICING-ENTRY

CONDITION

Public

Undocumented

AMOUNT-ERROR

COMMODITY-ERROR