/usr/include/opencollada/COLLADASaxFrameworkLoader/COLLADASaxFWLFormulasLoader.h is in opencollada-dev 0.1.0~20140703.ddf8f47+dfsg1-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 | /*
Copyright (c) 2008-2009 NetAllied Systems GmbH
This file is part of COLLADASaxFrameworkLoader.
Licensed under the MIT Open Source License,
for details please see LICENSE file or the website
http://www.opensource.org/licenses/mit-license.php
*/
#ifndef __COLLADASAXFWL_FORMULASLOADER_H__
#define __COLLADASAXFWL_FORMULASLOADER_H__
#include "COLLADASaxFWLPrerequisites.h"
#include "COLLADASaxFWLXmlTypes.h"
#include "COLLADASaxFWLHelperLoaderBase.h"
#include "COLLADAFWFormula.h"
#include <stack>
#include <vector>
// forward declarations
namespace MathML
{
namespace AST
{
class INode;
class ConstantExpression;
}
}
namespace COLLADASaxFWL
{
/** MathML operators and functions. */
enum Operator
{
/** arithmetic operators. */
ADD,
SUB,
MUL,
DIV,
/** logic operators. */
NOT,
AND,
OR,
XOR,
/** relation operators. */
EQ,
NEQ,
LT,
LTE,
GT,
GTE,
/** basic functions. */
POW,
FACTORIAL,
ABS,
EXP,
LN,
MIN,
MAX,
CEIL,
FLOOR,
GCD,
LCM,
REM,
ROOT,
LOG,
/** trigonometric functions. */
SIN,
COS,
TAN,
SEC,
CSC,
COT,
ARCSIN,
ARCCOS,
ARCTAN,
ARCSEC,
ARCCSC,
ARCCOT,
SINH,
COSH,
TANH,
SECH,
CSCH,
COTH,
ARCSINH,
ARCCOSH,
ARCTANH,
ARCCOTH,
ARCSECH,
ARCCSCH,
/** A function defined via MathML in the COLLADA file. */
USER_DEFINED_FUNCTION
};
typedef std::vector< MathML::AST::INode* > NodeVector;
typedef std::stack< NodeVector > NodeListStack;
typedef std::stack< Operator > OperatorStack;
/** Base class for all libraries that can contain formulas */
class FormulasLoader : public HelperLoaderBase
{
private:
/** The current formula. */
COLLADAFW::Formula* mCurrentFormula;
/** Stack of node lists. */
NodeListStack mNodeListStack;
/** Stack of operators. */
OperatorStack mOperatorStack;
/** Contains current Text data. May be used for cn/ci/csymbol. */
String mCurrentTextData;
/** Contains current Text data after <sep /> occurred. */
String mCurrentTextDataAfterSep;
/** Indicates if <sep /> was present inside <cn>. */
bool mSepOccurred;
/** Unique id of the function referenced by the current csymbol.*/
COLLADAFW::UniqueId mCurrentCSymbolFunctionUniqueId;
/** True if the currently open <csymbol> is a function, if none is open or it is not a function,
it is false.*/
bool mCurrentCSymbolIsFunction;
/** True if a child of the last opened <apply> has been parsed. False otherwise.*/
bool mCurrentApplyHasChild;
/** True if we are within a new param element.*/
bool mWithinNewParam;
/** The formula new param currently being parsed.*/
COLLADAFW::FormulaNewParam* mCurrentFormulaNewParam;
/** The sid of the current new param.*/
String mCurrentFormulaNewParamSid;
public:
/** Constructor. */
FormulasLoader();
/** Destructor. */
virtual ~FormulasLoader();
/** Returns the unique id of the current parsed object. */
virtual const COLLADAFW::UniqueId& getUniqueId();
/** Creates a new formula.*/
virtual bool begin__formula( const formula__AttributeData& attributeData );
/** Sends formula to the writer.*/
virtual bool end__formula();
/**
* TODO add parameters and target to FW Formula.
* Do it in a way that <csymbol encoding="COLLADA">s can easily be resolved.
* <csymbol type="function">s are referencing <formula>s from <library_formula>
* these must be resolved and mapped to a AST::FragmentExpression.
* The 'type' attribute of <csymbol> is not present in XSD.
* Use unknownAttributes member of AttributeData struct.
*/
virtual bool begin__newparam( const formula_newparam_type__AttributeData& attributeData );
virtual bool end__newparam();
virtual bool begin__target(){return true;}
virtual bool end__target(){return true;}
virtual bool begin__param(){return true;}
virtual bool end__param(){return true;}
virtual bool data__param( const ParserChar* value, size_t length ){return true;}
virtual bool begin__float();
virtual bool end__float();
virtual bool data__float( float value );
virtual bool begin__int();
virtual bool end__int();
virtual bool data__int( int value );
virtual bool begin__bool();
virtual bool end__bool();
virtual bool data__bool( bool value );
virtual bool begin__technique_common(){return true;}
virtual bool end__technique_common(){return true;}
/** Pushes a new node list on node list stack. */
virtual bool begin__math( const math__AttributeData& attributeData );
/** Adds an MathML AST to current formula. */
virtual bool end__math();
/** Pushes a new node list on node list stack. */
virtual bool begin__apply( const apply__AttributeData& attributeData );
/** Creates a MathML AST and adds it to an appropriate NodeList. */
virtual bool end__apply();
/** Ignored. */
virtual bool begin__cn( const cn__AttributeData& attributeData );
/**
* Creates a ConstantExpression with mCurrentTextData
* and adds it to top node list on stack.
* Resets mSepOccurred.
*/
virtual bool end__cn();
/** Appends text to mCurrentTextData. */
virtual bool data__cn( const ParserChar* value, size_t length );
/** Sets mSepOccurred. */
virtual bool begin__sep(){mSepOccurred=true; return true;}
/** Ignored. */
virtual bool end__sep(){return true;}
/** Ignored. */
virtual bool begin__ci( const ci__AttributeData& attributeData );
/**
* Creates a VariableExpression with mCurrentTextData
* and adds it to top node list on stack.
*/
virtual bool end__ci();
/** Appends text to mCurrentTextData. */
virtual bool data__ci( const ParserChar* value, size_t length );
/**
* TODO create AST::VariableExpression or AST::FragmentExpression.
*/
/** We do not need to do anything here.*/
virtual bool begin__csymbol( const csymbol__AttributeData& attributeData );
/**
* Creates a COLLADACsymbol with mCurrentTextData
* and adds it to top node list on stack.
*/
virtual bool end__csymbol();
/** Appends text to mCurrentTextData. */
virtual bool data__csymbol( const ParserChar* value, size_t length );
/**
* As COLLADA uses it's own <formula> element to declare functions,
* MathML <declare> is ignored.
*/
virtual bool begin__declare( const declare__AttributeData& attributeData ){return true;}
virtual bool end__declare(){return true;}
/** Creates a ConstantExpression with appropriate value. */
virtual bool begin__exponentiale( const exponentiale__AttributeData& attributeData );
/** Ignored. */
virtual bool end__exponentiale(){return true;}
/** Creates a ConstantExpression with appropriate value. */
virtual bool begin__pi( const pi__AttributeData& attributeData );
/** Ignored. */
virtual bool end__pi(){return true;}
/** Creates a ConstantExpression with appropriate value. */
virtual bool begin__true( const true__AttributeData& attributeData );
/** Ignored. */
virtual bool end__true(){return true;}
/** Creates a ConstantExpression with appropriate value. */
virtual bool begin__false( const false__AttributeData& attributeData );
/** Ignored. */
virtual bool end__false(){return true;}
/** Pushes an operator on mOperatorStack. */
virtual bool begin__quotient( const quotient__AttributeData& attributeData );
/** Ignored. */
virtual bool end__quotient(){return true;}
/** Pushes an operator on mOperatorStack. */
virtual bool begin__divide( const divide__AttributeData& attributeData );
/** Ignored. */
virtual bool end__divide(){return true;}
/** Pushes an operator on mOperatorStack. */
virtual bool begin__times( const times__AttributeData& attributeData );
/** Ignored. */
virtual bool end__times(){return true;}
/** Pushes an operator on mOperatorStack. */
virtual bool begin__minus( const minus__AttributeData& attributeData );
/** Ignored. */
virtual bool end__minus(){return true;}
/** Pushes an operator on mOperatorStack. */
virtual bool begin__plus( const plus__AttributeData& attributeData );
/** Ignored. */
virtual bool end__plus(){return true;}
/** Pushes an operator on mOperatorStack. */
virtual bool begin__sum( const sum__AttributeData& attributeData );
/** Ignored. */
virtual bool end__sum(){return true;}
/** Pushes an operator on mOperatorStack. */
virtual bool begin__product( const product__AttributeData& attributeData );
/** Ignored. */
virtual bool end__product(){return true;}
/** Pushes an operator on mOperatorStack. */
virtual bool begin__and( const and__AttributeData& attributeData );
/** Ignored. */
virtual bool end__and(){return true;}
/** Pushes an operator on mOperatorStack. */
virtual bool begin__or( const or__AttributeData& attributeData );
/** Ignored. */
virtual bool end__or(){return true;}
/** Pushes an operator on mOperatorStack. */
virtual bool begin__xor( const xor__AttributeData& attributeData );
/** Ignored. */
virtual bool end__xor(){return true;}
/** Pushes an operator on mOperatorStack. */
virtual bool begin__not( const not__AttributeData& attributeData );
/** Ignored. */
virtual bool end__not(){return true;}
/** Pushes an operator on mOperatorStack. */
virtual bool begin__eq( const eq__AttributeData& attributeData );
/** Ignored. */
virtual bool end__eq(){return true;}
/** Pushes an operator on mOperatorStack. */
virtual bool begin__neq( const neq__AttributeData& attributeData );
/** Ignored. */
virtual bool end__neq(){return true;}
/** Pushes an operator on mOperatorStack. */
virtual bool begin__leq( const leq__AttributeData& attributeData );
/** Ignored. */
virtual bool end__leq(){return true;}
/** Pushes an operator on mOperatorStack. */
virtual bool begin__lt( const lt__AttributeData& attributeData );
/** Ignored. */
virtual bool end__lt(){return true;}
/** Pushes an operator on mOperatorStack. */
virtual bool begin__geq( const geq__AttributeData& attributeData );
/** Ignored. */
virtual bool end__geq(){return true;}
/** Pushes an operator on mOperatorStack. */
virtual bool begin__gt( const gt__AttributeData& attributeData );
/** Ignored. */
virtual bool end__gt(){return true;}
/** Pushes an operator on mOperatorStack. */
virtual bool begin__equivalent( const equivalent__AttributeData& attributeData );
/** Ignored. */
virtual bool end__equivalent(){return true;}
/** Pushes an operator on mOperatorStack. */
virtual bool begin__abs( const abs__AttributeData& attributeData );
/** Ignored. */
virtual bool end__abs(){return true;}
/** Pushes an operator on mOperatorStack. */
virtual bool begin__factorial( const factorial__AttributeData& attributeData );
/** Ignored. */
virtual bool end__factorial(){return true;}
/** Pushes an operator on mOperatorStack. */
virtual bool begin__floor( const floor__AttributeData& attributeData );
/** Ignored. */
virtual bool end__floor(){return true;}
/** Pushes an operator on mOperatorStack. */
virtual bool begin__ceiling( const ceiling__AttributeData& attributeData );
/** Ignored. */
virtual bool end__ceiling(){return true;}
/** Pushes an operator on mOperatorStack. */
virtual bool begin__rem( const rem__AttributeData& attributeData );
/** Ignored. */
virtual bool end__rem(){return true;}
/** Pushes an operator on mOperatorStack. */
virtual bool begin__power( const power__AttributeData& attributeData );
/** Ignored. */
virtual bool end__power(){return true;}
/** Pushes an operator on mOperatorStack. */
virtual bool begin__root( const root__AttributeData& attributeData );
/** Ignored. */
virtual bool end__root(){return true;}
/** Pushes an operator on mOperatorStack. */
virtual bool begin__max( const max__AttributeData& attributeData );
/** Ignored. */
virtual bool end__max(){return true;}
/** Pushes an operator on mOperatorStack. */
virtual bool begin__min( const min__AttributeData& attributeData );
/** Ignored. */
virtual bool end__min(){return true;}
/** Pushes an operator on mOperatorStack. */
virtual bool begin__gcd( const gcd__AttributeData& attributeData );
/** Ignored. */
virtual bool end__gcd(){return true;}
/** Pushes an operator on mOperatorStack. */
virtual bool begin__lcm( const lcm__AttributeData& attributeData );
/** Ignored. */
virtual bool end__lcm(){return true;}
/** Pushes an operator on mOperatorStack. */
virtual bool begin__exp( const exp__AttributeData& attributeData );
/** Ignored. */
virtual bool end__exp(){return true;}
/** Pushes an operator on mOperatorStack. */
virtual bool begin__ln( const ln__AttributeData& attributeData );
/** Ignored. */
virtual bool end__ln(){return true;}
/** Pushes an operator on mOperatorStack. */
virtual bool begin__log( const log__AttributeData& attributeData );
/** Ignored. */
virtual bool end__log(){return true;}
/** Pushes a new node list on node list stack. */
virtual bool begin__logbase( const logbase__AttributeData& attributeData );
/** Adds first node of top node list to an appropriate NodeList. */
virtual bool end__logbase();
/** Pushes an operator on mOperatorStack. */
virtual bool begin__sin( const sin__AttributeData& attributeData );
/** Ignored. */
virtual bool end__sin(){return true;}
/** Pushes an operator on mOperatorStack. */
virtual bool begin__cos( const cos__AttributeData& attributeData );
/** Ignored. */
virtual bool end__cos(){return true;}
/** Pushes an operator on mOperatorStack. */
virtual bool begin__tan( const tan__AttributeData& attributeData );
/** Ignored. */
virtual bool end__tan(){return true;}
/** Pushes an operator on mOperatorStack. */
virtual bool begin__sec( const sec__AttributeData& attributeData );
/** Ignored. */
virtual bool end__sec(){return true;}
/** Pushes an operator on mOperatorStack. */
virtual bool begin__csc( const csc__AttributeData& attributeData );
/** Ignored. */
virtual bool end__csc(){return true;}
/** Pushes an operator on mOperatorStack. */
virtual bool begin__cot( const cot__AttributeData& attributeData );
/** Ignored. */
virtual bool end__cot(){return true;}
/** Pushes an operator on mOperatorStack. */
virtual bool begin__arcsin( const arcsin__AttributeData& attributeData );
/** Ignored. */
virtual bool end__arcsin(){return true;}
/** Pushes an operator on mOperatorStack. */
virtual bool begin__arccos( const arccos__AttributeData& attributeData );
/** Ignored. */
virtual bool end__arccos(){return true;}
/** Pushes an operator on mOperatorStack. */
virtual bool begin__arctan( const arctan__AttributeData& attributeData );
/** Ignored. */
virtual bool end__arctan(){return true;}
/** Pushes an operator on mOperatorStack. */
virtual bool begin__arcsec( const arcsec__AttributeData& attributeData );
/** Ignored. */
virtual bool end__arcsec(){return true;}
/** Pushes an operator on mOperatorStack. */
virtual bool begin__arccsc( const arccsc__AttributeData& attributeData );
/** Ignored. */
virtual bool end__arccsc(){return true;}
/** Pushes an operator on mOperatorStack. */
virtual bool begin__arccot( const arccot__AttributeData& attributeData );
/** Ignored. */
virtual bool end__arccot(){return true;}
/** Pushes an operator on mOperatorStack. */
virtual bool begin__sinh( const sinh__AttributeData& attributeData );
/** Ignored. */
virtual bool end__sinh(){return true;}
/** Pushes an operator on mOperatorStack. */
virtual bool begin__cosh( const cosh__AttributeData& attributeData );
/** Ignored. */
virtual bool end__cosh(){return true;}
/** Pushes an operator on mOperatorStack. */
virtual bool begin__tanh( const tanh__AttributeData& attributeData );
/** Ignored. */
virtual bool end__tanh(){return true;}
/** Pushes an operator on mOperatorStack. */
virtual bool begin__sech( const sech__AttributeData& attributeData );
/** Ignored. */
virtual bool end__sech(){return true;}
/** Pushes an operator on mOperatorStack. */
virtual bool begin__csch( const csch__AttributeData& attributeData );
/** Ignored. */
virtual bool end__csch(){return true;}
/** Pushes an operator on mOperatorStack. */
virtual bool begin__coth( const coth__AttributeData& attributeData );
/** Ignored. */
virtual bool end__coth(){return true;}
/** Pushes an operator on mOperatorStack. */
virtual bool begin__arccosh( const arccosh__AttributeData& attributeData );
/** Ignored. */
virtual bool end__arccosh(){return true;}
/** Pushes an operator on mOperatorStack. */
virtual bool begin__arccoth( const arccoth__AttributeData& attributeData );
/** Ignored. */
virtual bool end__arccoth(){return true;}
/** Pushes an operator on mOperatorStack. */
virtual bool begin__arccsch( const arccsch__AttributeData& attributeData );
/** Ignored. */
virtual bool end__arccsch(){return true;}
/** Pushes an operator on mOperatorStack. */
virtual bool begin__arcsech( const arcsech__AttributeData& attributeData );
/** Ignored. */
virtual bool end__arcsech(){return true;}
/** Pushes an operator on mOperatorStack. */
virtual bool begin__arcsinh( const arcsinh__AttributeData& attributeData );
/** Ignored. */
virtual bool end__arcsinh(){return true;}
/** Pushes an operator on mOperatorStack. */
virtual bool begin__arctanh( const arctanh__AttributeData& attributeData );
/** Ignored. */
virtual bool end__arctanh(){return true;}
/////////////////////////////////////////////////
// The following SAX calls are ignored
/////////////////////////////////////////////////
virtual bool begin__conjugate( const conjugate__AttributeData& attributeData ){return true;}
virtual bool end__conjugate(){return true;}
virtual bool begin__arg( const arg__AttributeData& attributeData ){return true;}
virtual bool end__arg(){return true;}
virtual bool begin__real( const real__AttributeData& attributeData ){return true;}
virtual bool end__real(){return true;}
virtual bool begin__imaginary( const imaginary__AttributeData& attributeData ){return true;}
virtual bool end__imaginary(){return true;}
virtual bool begin__compose( const compose__AttributeData& attributeData ){return true;}
virtual bool end__compose(){return true;}
virtual bool begin__domain( const domain__AttributeData& attributeData ){return true;}
virtual bool end__domain(){return true;}
virtual bool begin__codomain( const codomain__AttributeData& attributeData ){return true;}
virtual bool end__codomain(){return true;}
virtual bool begin__image____Functions_type( const image____Functions_type__AttributeData& attributeData ){return true;}
virtual bool end__image____Functions_type(){return true;}
virtual bool begin__domainofapplication( const domainofapplication__AttributeData& attributeData ){return true;}
virtual bool end__domainofapplication(){return true;}
virtual bool begin__ident( const ident__AttributeData& attributeData ){return true;}
virtual bool end__ident(){return true;}
virtual bool begin__exists( const exists__AttributeData& attributeData ){return true;}
virtual bool end__exists(){return true;}
virtual bool begin__forall( const forall__AttributeData& attributeData ){return true;}
virtual bool end__forall(){return true;}
virtual bool begin__implies( const implies__AttributeData& attributeData ){return true;}
virtual bool end__implies(){return true;}
virtual bool begin__naturalnumbers( const naturalnumbers__AttributeData& attributeData ){return true;}
virtual bool end__naturalnumbers(){return true;}
virtual bool begin__primes( const primes__AttributeData& attributeData ){return true;}
virtual bool end__primes(){return true;}
virtual bool begin__integers( const integers__AttributeData& attributeData ){return true;}
virtual bool end__integers(){return true;}
virtual bool begin__rationals( const rationals__AttributeData& attributeData ){return true;}
virtual bool end__rationals(){return true;}
virtual bool begin__reals( const reals__AttributeData& attributeData ){return true;}
virtual bool end__reals(){return true;}
virtual bool begin__complexes( const complexes__AttributeData& attributeData ){return true;}
virtual bool end__complexes(){return true;}
virtual bool begin__emptyset( const emptyset__AttributeData& attributeData ){return true;}
virtual bool end__emptyset(){return true;}
virtual bool begin__imaginaryi( const imaginaryi__AttributeData& attributeData ){return true;}
virtual bool end__imaginaryi(){return true;}
virtual bool begin__eulergamma( const eulergamma__AttributeData& attributeData ){return true;}
virtual bool end__eulergamma(){return true;}
virtual bool begin__infinity( const infinity__AttributeData& attributeData ){return true;}
virtual bool end__infinity(){return true;}
virtual bool begin__notanumber( const notanumber__AttributeData& attributeData ){return true;}
virtual bool end__notanumber(){return true;}
virtual bool begin__set( const set__AttributeData& attributeData ){return true;}
virtual bool end__set(){return true;}
virtual bool begin__list( const list__AttributeData& attributeData ){return true;}
virtual bool end__list(){return true;}
virtual bool begin__union( const union__AttributeData& attributeData ){return true;}
virtual bool end__union(){return true;}
virtual bool begin__intersect( const intersect__AttributeData& attributeData ){return true;}
virtual bool end__intersect(){return true;}
virtual bool begin__in( const in__AttributeData& attributeData ){return true;}
virtual bool end__in(){return true;}
virtual bool begin__notin( const notin__AttributeData& attributeData ){return true;}
virtual bool end__notin(){return true;}
virtual bool begin__subset( const subset__AttributeData& attributeData ){return true;}
virtual bool end__subset(){return true;}
virtual bool begin__prsubset( const prsubset__AttributeData& attributeData ){return true;}
virtual bool end__prsubset(){return true;}
virtual bool begin__notsubset( const notsubset__AttributeData& attributeData ){return true;}
virtual bool end__notsubset(){return true;}
virtual bool begin__notprsubset( const notprsubset__AttributeData& attributeData ){return true;}
virtual bool end__notprsubset(){return true;}
virtual bool begin__setdiff( const setdiff__AttributeData& attributeData ){return true;}
virtual bool end__setdiff(){return true;}
virtual bool begin__card( const card__AttributeData& attributeData ){return true;}
virtual bool end__card(){return true;}
virtual bool begin__cartesianproduct( const cartesianproduct__AttributeData& attributeData ){return true;}
virtual bool end__cartesianproduct(){return true;}
virtual bool begin__approx( const approx__AttributeData& attributeData ){return true;}
virtual bool end__approx(){return true;}
virtual bool begin__factorof( const factorof__AttributeData& attributeData ){return true;}
virtual bool end__factorof(){return true;}
virtual bool begin__int____int_type____mathml( const int____int_type____mathml__AttributeData& attributeData ){return true;}
virtual bool end__int____int_type____mathml(){return true;}
virtual bool begin__diff( const diff__AttributeData& attributeData ){return true;}
virtual bool end__diff(){return true;}
virtual bool begin__partialdiff( const partialdiff__AttributeData& attributeData ){return true;}
virtual bool end__partialdiff(){return true;}
virtual bool begin__limit( const limit__AttributeData& attributeData ){return true;}
virtual bool end__limit(){return true;}
virtual bool begin__lowlimit( const lowlimit__AttributeData& attributeData ){return true;}
virtual bool end__lowlimit(){return true;}
virtual bool begin__uplimit( const uplimit__AttributeData& attributeData ){return true;}
virtual bool end__uplimit(){return true;}
virtual bool begin__tendsto( const tendsto__AttributeData& attributeData ){return true;}
virtual bool end__tendsto(){return true;}
virtual bool begin__vector( const vector__AttributeData& attributeData ){return true;}
virtual bool end__vector(){return true;}
virtual bool begin__matrix____matrix_type____mathml( const matrix____matrix_type____mathml__AttributeData& attributeData ){return true;}
virtual bool end__matrix____matrix_type____mathml(){return true;}
virtual bool begin__matrixrow( const matrixrow__AttributeData& attributeData ){return true;}
virtual bool end__matrixrow(){return true;}
virtual bool begin__determinant( const determinant__AttributeData& attributeData ){return true;}
virtual bool end__determinant(){return true;}
virtual bool begin__transpose( const transpose__AttributeData& attributeData ){return true;}
virtual bool end__transpose(){return true;}
virtual bool begin__selector( const selector__AttributeData& attributeData ){return true;}
virtual bool end__selector(){return true;}
virtual bool begin__vectorproduct( const vectorproduct__AttributeData& attributeData ){return true;}
virtual bool end__vectorproduct(){return true;}
virtual bool begin__scalarproduct( const scalarproduct__AttributeData& attributeData ){return true;}
virtual bool end__scalarproduct(){return true;}
virtual bool begin__outerproduct( const outerproduct__AttributeData& attributeData ){return true;}
virtual bool end__outerproduct(){return true;}
virtual bool begin__divergence( const divergence__AttributeData& attributeData ){return true;}
virtual bool end__divergence(){return true;}
virtual bool begin__grad( const grad__AttributeData& attributeData ){return true;}
virtual bool end__grad(){return true;}
virtual bool begin__curl( const curl__AttributeData& attributeData ){return true;}
virtual bool end__curl(){return true;}
virtual bool begin__laplacian( const laplacian__AttributeData& attributeData ){return true;}
virtual bool end__laplacian(){return true;}
virtual bool begin__mean( const mean__AttributeData& attributeData ){return true;}
virtual bool end__mean(){return true;}
virtual bool begin__sdev( const sdev__AttributeData& attributeData ){return true;}
virtual bool end__sdev(){return true;}
virtual bool begin__variance( const variance__AttributeData& attributeData ){return true;}
virtual bool end__variance(){return true;}
virtual bool begin__median( const median__AttributeData& attributeData ){return true;}
virtual bool end__median(){return true;}
virtual bool begin__mode____mode_type( const mode____mode_type__AttributeData& attributeData ){return true;}
virtual bool end__mode____mode_type(){return true;}
virtual bool begin__moment( const moment__AttributeData& attributeData ){return true;}
virtual bool end__moment(){return true;}
virtual bool begin__momentabout( const momentabout__AttributeData& attributeData ){return true;}
virtual bool end__momentabout(){return true;}
virtual bool begin__interval( const interval__AttributeData& attributeData ){return true;}
virtual bool end__interval(){return true;}
virtual bool begin__inverse( const inverse__AttributeData& attributeData ){return true;}
virtual bool end__inverse(){return true;}
virtual bool begin__condition( const condition__AttributeData& attributeData ){return true;}
virtual bool end__condition(){return true;}
virtual bool begin__lambda( const lambda__AttributeData& attributeData ){return true;}
virtual bool end__lambda(){return true;}
virtual bool begin__piecewise( const piecewise__AttributeData& attributeData ){return true;}
virtual bool end__piecewise(){return true;}
virtual bool begin__piece(){return true;}
virtual bool end__piece(){return true;}
virtual bool begin__bvar( const bvar__AttributeData& attributeData ){return true;}
virtual bool end__bvar(){return true;}
virtual bool begin__degree( const degree__AttributeData& attributeData ){return true;}
virtual bool end__degree(){return true;}
virtual bool begin__semantics( const semantics__AttributeData& attributeData ){return true;}
virtual bool end__semantics(){return true;}
virtual bool begin__annotation( const annotation__AttributeData& attributeData ){return true;}
virtual bool end__annotation(){return true;}
virtual bool data__annotation( const ParserChar* value, size_t length ){return true;}
virtual bool begin__annotation_xml( const annotation_xml__AttributeData& attributeData ){return true;}
virtual bool end__annotation_xml(){return true;}
virtual bool begin__otherwise( const otherwise__AttributeData& attributeData ){return true;}
virtual bool end__otherwise(){return true;}
protected:
/**
* Creates a constant.
* @param value Value of the constant.
*/
MathML::AST::ConstantExpression* createConstant( const String& value );
/**
* Creates an operation with one operand.
* @param nodes Parameter of the operation.
* @param op Operator of the operation.
*/
virtual MathML::AST::INode* createUnaryOperation( const NodeVector& nodes, Operator op );
/**
* Creates an operation with more than one operand.
* @param nodes Parameters of the operation.
* @param op Operator of the operation.
*/
virtual MathML::AST::INode* createMultiOperandOperation( const NodeVector& nodes, Operator op );
/**
* Creates an arithmetic operation.
* @param nodes Parameters of the operation.
* @param op Operator of the operation.
*/
virtual MathML::AST::INode* createArithmeticOperation( const NodeVector& nodes, Operator op );
/**
* Creates a logic operation.
* @param nodes Parameters of the operation.
* @param op Operator of the operation.
*/
virtual MathML::AST::INode* createLogicOperation( const NodeVector& nodes, Operator op );
/**
* Creates a binary comparison operation.
* @param nodes Parameters of the operation.
* @param op Operator of the operation.
*/
virtual MathML::AST::INode* createBinaryComparisonOperation( const NodeVector& nodes, Operator op );
/**
* Creates a function operation.
* @param nodes Parameters of the function.
* @param op Function code.
*/
virtual MathML::AST::INode* createFunctionOperation( const NodeVector& nodes, Operator op );
/**
* Creates a user defined function operation.
* @param nodes Parameters of the function.
* @param op Function code.
*/
virtual MathML::AST::INode* createUserDefinedFunctionOperation( const NodeVector& nodes );
/**
* Finds out if given operator belongs to a function.
* @param op Operator to check.
* @return true if given operator is a function.
*/
virtual bool isFunction( Operator op );
/**
* Adds given node to appropriate node list.
* @param node New created node which shall be added to a list.
* @return True on success.
*/
virtual bool appendNewNode( MathML::AST::INode* node );
private:
/** Disable default copy ctor. */
FormulasLoader( const FormulasLoader& pre );
/** Disable default assignment operator. */
const FormulasLoader& operator= ( const FormulasLoader& pre );
};
} // namespace COLLADASAXFWL
#endif // __COLLADASAXFWL_FORMULASLOADER_H__
|