1 // This file may be redistributed and modified only under the terms of 2 // the GNU Lesser General Public License (See COPYING for details). 3 // Copyright 2000-2001 Stefanus Du Toit and Aloril. 4 // Copyright 2001-2005 Alistair Riddoch. 5 // Automatically generated using gen_cpp.py. 6 7 #ifndef ATLAS_OBJECTS_OPERATION_OPERATION_H 8 #define ATLAS_OBJECTS_OPERATION_OPERATION_H 9 10 #include <Atlas/Objects/RootOperation.h> 11 #include <Atlas/Objects/Generic.h> 12 13 14 namespace Atlas { namespace Objects { namespace Operation { 15 16 /** This is base operator for operations that might have effects. 17 18 This is base operation for all other 19 operations and defines basic attributes. You can use this as 20 starting point for browsing whole operation hiearchy. refno refers 21 to operation this is reply for. In examples all attributes that 22 are just as examples (and thus world specific) are started with 'e_'. 23 24 */ 25 26 class ActionData; 27 typedef SmartPtr<ActionData> Action; 28 29 static const int ACTION_NO = 10; 30 31 /// \brief This is base operator for operations that might have effects.. 32 /// 33 /** This is base operation for all other 34 operations and defines basic attributes. You can use this as 35 starting point for browsing whole operation hiearchy. refno refers 36 to operation this is reply for. In examples all attributes that 37 are just as examples (and thus world specific) are started with 'e_'. 38 */ 39 class ActionData : public RootOperationData 40 { 41 protected: 42 /// Construct a ActionData class definition. 43 ActionData(ActionData *defaults = NULL) : 44 RootOperationData((RootOperationData*)defaults) 45 { 46 m_class_no = ACTION_NO; 47 } 48 /// Default destructor. 49 virtual ~ActionData(); 50 51 public: 52 /// Copy this object. 53 virtual ActionData * copy() const; 54 55 /// Is this instance of some class? 56 virtual bool instanceOf(int classNo) const; 57 58 iterate(int & current_class,std::string & attr)59 virtual void iterate(int& current_class, std::string& attr) const 60 {if(current_class == ACTION_NO) current_class = -1; RootOperationData::iterate(current_class, attr);} 61 62 //freelist related things 63 public: 64 static ActionData *alloc(); 65 virtual void free(); 66 67 /// \brief Get the reference object that contains the default values for 68 /// attributes of instances of the same class as this object. 69 /// 70 /// @return a pointer to the default object. 71 virtual ActionData *getDefaultObject(); 72 73 /// \brief Get the reference object that contains the default values for 74 /// attributes of instances of this class. 75 /// 76 /// @return a pointer to the default object. 77 static ActionData *getDefaultObjectInstance(); 78 private: 79 static ActionData *defaults_ActionData; 80 static ActionData *begin_ActionData; 81 }; 82 83 84 /** Create new things from nothing using this operator. 85 86 Map editor is main user for this in client side. Server uses this inside "info" operation to tell client about new things. 87 88 */ 89 90 class CreateData; 91 typedef SmartPtr<CreateData> Create; 92 93 static const int CREATE_NO = 11; 94 95 /// \brief Create new things from nothing using this operator.. 96 /// 97 /** Map editor is main user for this in client side. Server uses this inside "info" operation to tell client about new things. 98 */ 99 class CreateData : public ActionData 100 { 101 protected: 102 /// Construct a CreateData class definition. 103 CreateData(CreateData *defaults = NULL) : 104 ActionData((ActionData*)defaults) 105 { 106 m_class_no = CREATE_NO; 107 } 108 /// Default destructor. 109 virtual ~CreateData(); 110 111 public: 112 /// Copy this object. 113 virtual CreateData * copy() const; 114 115 /// Is this instance of some class? 116 virtual bool instanceOf(int classNo) const; 117 118 iterate(int & current_class,std::string & attr)119 virtual void iterate(int& current_class, std::string& attr) const 120 {if(current_class == CREATE_NO) current_class = -1; ActionData::iterate(current_class, attr);} 121 122 //freelist related things 123 public: 124 static CreateData *alloc(); 125 virtual void free(); 126 127 /// \brief Get the reference object that contains the default values for 128 /// attributes of instances of the same class as this object. 129 /// 130 /// @return a pointer to the default object. 131 virtual CreateData *getDefaultObject(); 132 133 /// \brief Get the reference object that contains the default values for 134 /// attributes of instances of this class. 135 /// 136 /// @return a pointer to the default object. 137 static CreateData *getDefaultObjectInstance(); 138 private: 139 static CreateData *defaults_CreateData; 140 static CreateData *begin_CreateData; 141 }; 142 143 144 /** Combine existing objects into new objects. 145 146 This is how normal characters create objects. 147 148 */ 149 150 class CombineData; 151 typedef SmartPtr<CombineData> Combine; 152 153 static const int COMBINE_NO = 12; 154 155 /// \brief Combine existing objects into new objects.. 156 /// 157 /** This is how normal characters create objects. 158 */ 159 class CombineData : public CreateData 160 { 161 protected: 162 /// Construct a CombineData class definition. 163 CombineData(CombineData *defaults = NULL) : 164 CreateData((CreateData*)defaults) 165 { 166 m_class_no = COMBINE_NO; 167 } 168 /// Default destructor. 169 virtual ~CombineData(); 170 171 public: 172 /// Copy this object. 173 virtual CombineData * copy() const; 174 175 /// Is this instance of some class? 176 virtual bool instanceOf(int classNo) const; 177 178 iterate(int & current_class,std::string & attr)179 virtual void iterate(int& current_class, std::string& attr) const 180 {if(current_class == COMBINE_NO) current_class = -1; CreateData::iterate(current_class, attr);} 181 182 //freelist related things 183 public: 184 static CombineData *alloc(); 185 virtual void free(); 186 187 /// \brief Get the reference object that contains the default values for 188 /// attributes of instances of the same class as this object. 189 /// 190 /// @return a pointer to the default object. 191 virtual CombineData *getDefaultObject(); 192 193 /// \brief Get the reference object that contains the default values for 194 /// attributes of instances of this class. 195 /// 196 /// @return a pointer to the default object. 197 static CombineData *getDefaultObjectInstance(); 198 private: 199 static CombineData *defaults_CombineData; 200 static CombineData *begin_CombineData; 201 }; 202 203 204 /** Divide existing object into pieces. 205 206 One of the pieces might be original object modified. 207 208 */ 209 210 class DivideData; 211 typedef SmartPtr<DivideData> Divide; 212 213 static const int DIVIDE_NO = 13; 214 215 /// \brief Divide existing object into pieces.. 216 /// 217 /** One of the pieces might be original object modified. 218 */ 219 class DivideData : public CreateData 220 { 221 protected: 222 /// Construct a DivideData class definition. 223 DivideData(DivideData *defaults = NULL) : 224 CreateData((CreateData*)defaults) 225 { 226 m_class_no = DIVIDE_NO; 227 } 228 /// Default destructor. 229 virtual ~DivideData(); 230 231 public: 232 /// Copy this object. 233 virtual DivideData * copy() const; 234 235 /// Is this instance of some class? 236 virtual bool instanceOf(int classNo) const; 237 238 iterate(int & current_class,std::string & attr)239 virtual void iterate(int& current_class, std::string& attr) const 240 {if(current_class == DIVIDE_NO) current_class = -1; CreateData::iterate(current_class, attr);} 241 242 //freelist related things 243 public: 244 static DivideData *alloc(); 245 virtual void free(); 246 247 /// \brief Get the reference object that contains the default values for 248 /// attributes of instances of the same class as this object. 249 /// 250 /// @return a pointer to the default object. 251 virtual DivideData *getDefaultObject(); 252 253 /// \brief Get the reference object that contains the default values for 254 /// attributes of instances of this class. 255 /// 256 /// @return a pointer to the default object. 257 static DivideData *getDefaultObjectInstance(); 258 private: 259 static DivideData *defaults_DivideData; 260 static DivideData *begin_DivideData; 261 }; 262 263 264 /** Base operator for all kind of communication. 265 266 Map editor is main user for this in client side. Server uses this inside "info" operation to tell client about new things. 267 268 */ 269 270 class CommunicateData; 271 typedef SmartPtr<CommunicateData> Communicate; 272 273 static const int COMMUNICATE_NO = 14; 274 275 /// \brief Base operator for all kind of communication.. 276 /// 277 /** Map editor is main user for this in client side. Server uses this inside "info" operation to tell client about new things. 278 */ 279 class CommunicateData : public CreateData 280 { 281 protected: 282 /// Construct a CommunicateData class definition. 283 CommunicateData(CommunicateData *defaults = NULL) : 284 CreateData((CreateData*)defaults) 285 { 286 m_class_no = COMMUNICATE_NO; 287 } 288 /// Default destructor. 289 virtual ~CommunicateData(); 290 291 public: 292 /// Copy this object. 293 virtual CommunicateData * copy() const; 294 295 /// Is this instance of some class? 296 virtual bool instanceOf(int classNo) const; 297 298 iterate(int & current_class,std::string & attr)299 virtual void iterate(int& current_class, std::string& attr) const 300 {if(current_class == COMMUNICATE_NO) current_class = -1; CreateData::iterate(current_class, attr);} 301 302 //freelist related things 303 public: 304 static CommunicateData *alloc(); 305 virtual void free(); 306 307 /// \brief Get the reference object that contains the default values for 308 /// attributes of instances of the same class as this object. 309 /// 310 /// @return a pointer to the default object. 311 virtual CommunicateData *getDefaultObject(); 312 313 /// \brief Get the reference object that contains the default values for 314 /// attributes of instances of this class. 315 /// 316 /// @return a pointer to the default object. 317 static CommunicateData *getDefaultObjectInstance(); 318 private: 319 static CommunicateData *defaults_CommunicateData; 320 static CommunicateData *begin_CommunicateData; 321 }; 322 323 324 /** used for talking 325 326 need to relook at that 'Magic voice that steps on something crunchy and makes magic voice which...' -IRC log 327 328 */ 329 330 class TalkData; 331 typedef SmartPtr<TalkData> Talk; 332 333 static const int TALK_NO = 15; 334 335 /// \brief used for talking. 336 /// 337 /** need to relook at that 'Magic voice that steps on something crunchy and makes magic voice which...' -IRC log 338 */ 339 class TalkData : public CommunicateData 340 { 341 protected: 342 /// Construct a TalkData class definition. 343 TalkData(TalkData *defaults = NULL) : 344 CommunicateData((CommunicateData*)defaults) 345 { 346 m_class_no = TALK_NO; 347 } 348 /// Default destructor. 349 virtual ~TalkData(); 350 351 public: 352 /// Copy this object. 353 virtual TalkData * copy() const; 354 355 /// Is this instance of some class? 356 virtual bool instanceOf(int classNo) const; 357 358 iterate(int & current_class,std::string & attr)359 virtual void iterate(int& current_class, std::string& attr) const 360 {if(current_class == TALK_NO) current_class = -1; CommunicateData::iterate(current_class, attr);} 361 362 //freelist related things 363 public: 364 static TalkData *alloc(); 365 virtual void free(); 366 367 /// \brief Get the reference object that contains the default values for 368 /// attributes of instances of the same class as this object. 369 /// 370 /// @return a pointer to the default object. 371 virtual TalkData *getDefaultObject(); 372 373 /// \brief Get the reference object that contains the default values for 374 /// attributes of instances of this class. 375 /// 376 /// @return a pointer to the default object. 377 static TalkData *getDefaultObjectInstance(); 378 private: 379 static TalkData *defaults_TalkData; 380 static TalkData *begin_TalkData; 381 }; 382 383 384 /** Delete something. 385 386 This is base operation for all other 387 operations and defines basic attributes. You can use this as 388 starting point for browsing whole operation hiearchy. refno refers 389 to operation this is reply for. In examples all attributes that 390 are just as examples (and thus world specific) are started with 'e_'. 391 392 */ 393 394 class DeleteData; 395 typedef SmartPtr<DeleteData> Delete; 396 397 static const int DELETE_NO = 16; 398 399 /// \brief Delete something.. 400 /// 401 /** This is base operation for all other 402 operations and defines basic attributes. You can use this as 403 starting point for browsing whole operation hiearchy. refno refers 404 to operation this is reply for. In examples all attributes that 405 are just as examples (and thus world specific) are started with 'e_'. 406 */ 407 class DeleteData : public ActionData 408 { 409 protected: 410 /// Construct a DeleteData class definition. 411 DeleteData(DeleteData *defaults = NULL) : 412 ActionData((ActionData*)defaults) 413 { 414 m_class_no = DELETE_NO; 415 } 416 /// Default destructor. 417 virtual ~DeleteData(); 418 419 public: 420 /// Copy this object. 421 virtual DeleteData * copy() const; 422 423 /// Is this instance of some class? 424 virtual bool instanceOf(int classNo) const; 425 426 iterate(int & current_class,std::string & attr)427 virtual void iterate(int& current_class, std::string& attr) const 428 {if(current_class == DELETE_NO) current_class = -1; ActionData::iterate(current_class, attr);} 429 430 //freelist related things 431 public: 432 static DeleteData *alloc(); 433 virtual void free(); 434 435 /// \brief Get the reference object that contains the default values for 436 /// attributes of instances of the same class as this object. 437 /// 438 /// @return a pointer to the default object. 439 virtual DeleteData *getDefaultObject(); 440 441 /// \brief Get the reference object that contains the default values for 442 /// attributes of instances of this class. 443 /// 444 /// @return a pointer to the default object. 445 static DeleteData *getDefaultObjectInstance(); 446 private: 447 static DeleteData *defaults_DeleteData; 448 static DeleteData *begin_DeleteData; 449 }; 450 451 452 /** Sets attributes for existing entity. 453 454 This is base operation for all other 455 operations and defines basic attributes. You can use this as 456 starting point for browsing whole operation hiearchy. refno refers 457 to operation this is reply for. In examples all attributes that 458 are just as examples (and thus world specific) are started with 'e_'. 459 460 */ 461 462 class SetData; 463 typedef SmartPtr<SetData> Set; 464 465 static const int SET_NO = 17; 466 467 /// \brief Sets attributes for existing entity.. 468 /// 469 /** This is base operation for all other 470 operations and defines basic attributes. You can use this as 471 starting point for browsing whole operation hiearchy. refno refers 472 to operation this is reply for. In examples all attributes that 473 are just as examples (and thus world specific) are started with 'e_'. 474 */ 475 class SetData : public ActionData 476 { 477 protected: 478 /// Construct a SetData class definition. 479 SetData(SetData *defaults = NULL) : 480 ActionData((ActionData*)defaults) 481 { 482 m_class_no = SET_NO; 483 } 484 /// Default destructor. 485 virtual ~SetData(); 486 487 public: 488 /// Copy this object. 489 virtual SetData * copy() const; 490 491 /// Is this instance of some class? 492 virtual bool instanceOf(int classNo) const; 493 494 iterate(int & current_class,std::string & attr)495 virtual void iterate(int& current_class, std::string& attr) const 496 {if(current_class == SET_NO) current_class = -1; ActionData::iterate(current_class, attr);} 497 498 //freelist related things 499 public: 500 static SetData *alloc(); 501 virtual void free(); 502 503 /// \brief Get the reference object that contains the default values for 504 /// attributes of instances of the same class as this object. 505 /// 506 /// @return a pointer to the default object. 507 virtual SetData *getDefaultObject(); 508 509 /// \brief Get the reference object that contains the default values for 510 /// attributes of instances of this class. 511 /// 512 /// @return a pointer to the default object. 513 static SetData *getDefaultObjectInstance(); 514 private: 515 static SetData *defaults_SetData; 516 static SetData *begin_SetData; 517 }; 518 519 520 /** Sets attributes for existing entity. 521 522 This is base operation for all other 523 operations and defines basic attributes. You can use this as 524 starting point for browsing whole operation hiearchy. refno refers 525 to operation this is reply for. In examples all attributes that 526 are just as examples (and thus world specific) are started with 'e_'. 527 528 */ 529 530 class AffectData; 531 typedef SmartPtr<AffectData> Affect; 532 533 static const int AFFECT_NO = 18; 534 535 /// \brief Sets attributes for existing entity.. 536 /// 537 /** This is base operation for all other 538 operations and defines basic attributes. You can use this as 539 starting point for browsing whole operation hiearchy. refno refers 540 to operation this is reply for. In examples all attributes that 541 are just as examples (and thus world specific) are started with 'e_'. 542 */ 543 class AffectData : public SetData 544 { 545 protected: 546 /// Construct a AffectData class definition. 547 AffectData(AffectData *defaults = NULL) : 548 SetData((SetData*)defaults) 549 { 550 m_class_no = AFFECT_NO; 551 } 552 /// Default destructor. 553 virtual ~AffectData(); 554 555 public: 556 /// Copy this object. 557 virtual AffectData * copy() const; 558 559 /// Is this instance of some class? 560 virtual bool instanceOf(int classNo) const; 561 562 iterate(int & current_class,std::string & attr)563 virtual void iterate(int& current_class, std::string& attr) const 564 {if(current_class == AFFECT_NO) current_class = -1; SetData::iterate(current_class, attr);} 565 566 //freelist related things 567 public: 568 static AffectData *alloc(); 569 virtual void free(); 570 571 /// \brief Get the reference object that contains the default values for 572 /// attributes of instances of the same class as this object. 573 /// 574 /// @return a pointer to the default object. 575 virtual AffectData *getDefaultObject(); 576 577 /// \brief Get the reference object that contains the default values for 578 /// attributes of instances of this class. 579 /// 580 /// @return a pointer to the default object. 581 static AffectData *getDefaultObjectInstance(); 582 private: 583 static AffectData *defaults_AffectData; 584 static AffectData *begin_AffectData; 585 }; 586 587 588 /** Change position 589 590 More about <a href="move.html">movement here</a> 591 592 */ 593 594 class MoveData; 595 typedef SmartPtr<MoveData> Move; 596 597 static const int MOVE_NO = 19; 598 599 /// \brief Change position. 600 /// 601 /** More about <a href="move.html">movement here</a> 602 */ 603 class MoveData : public SetData 604 { 605 protected: 606 /// Construct a MoveData class definition. 607 MoveData(MoveData *defaults = NULL) : 608 SetData((SetData*)defaults) 609 { 610 m_class_no = MOVE_NO; 611 } 612 /// Default destructor. 613 virtual ~MoveData(); 614 615 public: 616 /// Copy this object. 617 virtual MoveData * copy() const; 618 619 /// Is this instance of some class? 620 virtual bool instanceOf(int classNo) const; 621 622 iterate(int & current_class,std::string & attr)623 virtual void iterate(int& current_class, std::string& attr) const 624 {if(current_class == MOVE_NO) current_class = -1; SetData::iterate(current_class, attr);} 625 626 //freelist related things 627 public: 628 static MoveData *alloc(); 629 virtual void free(); 630 631 /// \brief Get the reference object that contains the default values for 632 /// attributes of instances of the same class as this object. 633 /// 634 /// @return a pointer to the default object. 635 virtual MoveData *getDefaultObject(); 636 637 /// \brief Get the reference object that contains the default values for 638 /// attributes of instances of this class. 639 /// 640 /// @return a pointer to the default object. 641 static MoveData *getDefaultObjectInstance(); 642 private: 643 static MoveData *defaults_MoveData; 644 static MoveData *begin_MoveData; 645 }; 646 647 648 /** Attach a tool to the character entity at a pre-defined location so that the character can use it. 649 650 This is base operation for all other 651 operations and defines basic attributes. You can use this as 652 starting point for browsing whole operation hiearchy. refno refers 653 to operation this is reply for. In examples all attributes that 654 are just as examples (and thus world specific) are started with 'e_'. 655 656 */ 657 658 class WieldData; 659 typedef SmartPtr<WieldData> Wield; 660 661 static const int WIELD_NO = 20; 662 663 /// \brief Attach a tool to the character entity at a pre-defined location so that the character can use it.. 664 /// 665 /** This is base operation for all other 666 operations and defines basic attributes. You can use this as 667 starting point for browsing whole operation hiearchy. refno refers 668 to operation this is reply for. In examples all attributes that 669 are just as examples (and thus world specific) are started with 'e_'. 670 */ 671 class WieldData : public SetData 672 { 673 protected: 674 /// Construct a WieldData class definition. 675 WieldData(WieldData *defaults = NULL) : 676 SetData((SetData*)defaults) 677 { 678 m_class_no = WIELD_NO; 679 } 680 /// Default destructor. 681 virtual ~WieldData(); 682 683 public: 684 /// Copy this object. 685 virtual WieldData * copy() const; 686 687 /// Is this instance of some class? 688 virtual bool instanceOf(int classNo) const; 689 690 iterate(int & current_class,std::string & attr)691 virtual void iterate(int& current_class, std::string& attr) const 692 {if(current_class == WIELD_NO) current_class = -1; SetData::iterate(current_class, attr);} 693 694 //freelist related things 695 public: 696 static WieldData *alloc(); 697 virtual void free(); 698 699 /// \brief Get the reference object that contains the default values for 700 /// attributes of instances of the same class as this object. 701 /// 702 /// @return a pointer to the default object. 703 virtual WieldData *getDefaultObject(); 704 705 /// \brief Get the reference object that contains the default values for 706 /// attributes of instances of this class. 707 /// 708 /// @return a pointer to the default object. 709 static WieldData *getDefaultObjectInstance(); 710 private: 711 static WieldData *defaults_WieldData; 712 static WieldData *begin_WieldData; 713 }; 714 715 716 /** Generic operation for getting info about things. 717 718 This is base operation for all other 719 operations and defines basic attributes. You can use this as 720 starting point for browsing whole operation hiearchy. refno refers 721 to operation this is reply for. In examples all attributes that 722 are just as examples (and thus world specific) are started with 'e_'. 723 724 */ 725 726 class GetData; 727 typedef SmartPtr<GetData> Get; 728 729 static const int GET_NO = 21; 730 731 /// \brief Generic operation for getting info about things.. 732 /// 733 /** This is base operation for all other 734 operations and defines basic attributes. You can use this as 735 starting point for browsing whole operation hiearchy. refno refers 736 to operation this is reply for. In examples all attributes that 737 are just as examples (and thus world specific) are started with 'e_'. 738 */ 739 class GetData : public ActionData 740 { 741 protected: 742 /// Construct a GetData class definition. 743 GetData(GetData *defaults = NULL) : 744 ActionData((ActionData*)defaults) 745 { 746 m_class_no = GET_NO; 747 } 748 /// Default destructor. 749 virtual ~GetData(); 750 751 public: 752 /// Copy this object. 753 virtual GetData * copy() const; 754 755 /// Is this instance of some class? 756 virtual bool instanceOf(int classNo) const; 757 758 iterate(int & current_class,std::string & attr)759 virtual void iterate(int& current_class, std::string& attr) const 760 {if(current_class == GET_NO) current_class = -1; ActionData::iterate(current_class, attr);} 761 762 //freelist related things 763 public: 764 static GetData *alloc(); 765 virtual void free(); 766 767 /// \brief Get the reference object that contains the default values for 768 /// attributes of instances of the same class as this object. 769 /// 770 /// @return a pointer to the default object. 771 virtual GetData *getDefaultObject(); 772 773 /// \brief Get the reference object that contains the default values for 774 /// attributes of instances of this class. 775 /// 776 /// @return a pointer to the default object. 777 static GetData *getDefaultObjectInstance(); 778 private: 779 static GetData *defaults_GetData; 780 static GetData *begin_GetData; 781 }; 782 783 784 /** Generic base operation for perceiving things by eyes, ears, etc... 785 786 This is base operation for all other 787 operations and defines basic attributes. You can use this as 788 starting point for browsing whole operation hiearchy. refno refers 789 to operation this is reply for. In examples all attributes that 790 are just as examples (and thus world specific) are started with 'e_'. 791 792 */ 793 794 class PerceiveData; 795 typedef SmartPtr<PerceiveData> Perceive; 796 797 static const int PERCEIVE_NO = 22; 798 799 /// \brief Generic base operation for perceiving things by eyes, ears, etc.... 800 /// 801 /** This is base operation for all other 802 operations and defines basic attributes. You can use this as 803 starting point for browsing whole operation hiearchy. refno refers 804 to operation this is reply for. In examples all attributes that 805 are just as examples (and thus world specific) are started with 'e_'. 806 */ 807 class PerceiveData : public GetData 808 { 809 protected: 810 /// Construct a PerceiveData class definition. 811 PerceiveData(PerceiveData *defaults = NULL) : 812 GetData((GetData*)defaults) 813 { 814 m_class_no = PERCEIVE_NO; 815 } 816 /// Default destructor. 817 virtual ~PerceiveData(); 818 819 public: 820 /// Copy this object. 821 virtual PerceiveData * copy() const; 822 823 /// Is this instance of some class? 824 virtual bool instanceOf(int classNo) const; 825 826 iterate(int & current_class,std::string & attr)827 virtual void iterate(int& current_class, std::string& attr) const 828 {if(current_class == PERCEIVE_NO) current_class = -1; GetData::iterate(current_class, attr);} 829 830 //freelist related things 831 public: 832 static PerceiveData *alloc(); 833 virtual void free(); 834 835 /// \brief Get the reference object that contains the default values for 836 /// attributes of instances of the same class as this object. 837 /// 838 /// @return a pointer to the default object. 839 virtual PerceiveData *getDefaultObject(); 840 841 /// \brief Get the reference object that contains the default values for 842 /// attributes of instances of this class. 843 /// 844 /// @return a pointer to the default object. 845 static PerceiveData *getDefaultObjectInstance(); 846 private: 847 static PerceiveData *defaults_PerceiveData; 848 static PerceiveData *begin_PerceiveData; 849 }; 850 851 852 /** Looking at something 853 854 This is base operation for all other 855 operations and defines basic attributes. You can use this as 856 starting point for browsing whole operation hiearchy. refno refers 857 to operation this is reply for. In examples all attributes that 858 are just as examples (and thus world specific) are started with 'e_'. 859 860 */ 861 862 class LookData; 863 typedef SmartPtr<LookData> Look; 864 865 static const int LOOK_NO = 23; 866 867 /// \brief Looking at something. 868 /// 869 /** This is base operation for all other 870 operations and defines basic attributes. You can use this as 871 starting point for browsing whole operation hiearchy. refno refers 872 to operation this is reply for. In examples all attributes that 873 are just as examples (and thus world specific) are started with 'e_'. 874 */ 875 class LookData : public PerceiveData 876 { 877 protected: 878 /// Construct a LookData class definition. 879 LookData(LookData *defaults = NULL) : 880 PerceiveData((PerceiveData*)defaults) 881 { 882 m_class_no = LOOK_NO; 883 } 884 /// Default destructor. 885 virtual ~LookData(); 886 887 public: 888 /// Copy this object. 889 virtual LookData * copy() const; 890 891 /// Is this instance of some class? 892 virtual bool instanceOf(int classNo) const; 893 894 iterate(int & current_class,std::string & attr)895 virtual void iterate(int& current_class, std::string& attr) const 896 {if(current_class == LOOK_NO) current_class = -1; PerceiveData::iterate(current_class, attr);} 897 898 //freelist related things 899 public: 900 static LookData *alloc(); 901 virtual void free(); 902 903 /// \brief Get the reference object that contains the default values for 904 /// attributes of instances of the same class as this object. 905 /// 906 /// @return a pointer to the default object. 907 virtual LookData *getDefaultObject(); 908 909 /// \brief Get the reference object that contains the default values for 910 /// attributes of instances of this class. 911 /// 912 /// @return a pointer to the default object. 913 static LookData *getDefaultObjectInstance(); 914 private: 915 static LookData *defaults_LookData; 916 static LookData *begin_LookData; 917 }; 918 919 920 /** Listen (something) 921 922 This is base operation for all other 923 operations and defines basic attributes. You can use this as 924 starting point for browsing whole operation hiearchy. refno refers 925 to operation this is reply for. In examples all attributes that 926 are just as examples (and thus world specific) are started with 'e_'. 927 928 */ 929 930 class ListenData; 931 typedef SmartPtr<ListenData> Listen; 932 933 static const int LISTEN_NO = 24; 934 935 /// \brief Listen (something). 936 /// 937 /** This is base operation for all other 938 operations and defines basic attributes. You can use this as 939 starting point for browsing whole operation hiearchy. refno refers 940 to operation this is reply for. In examples all attributes that 941 are just as examples (and thus world specific) are started with 'e_'. 942 */ 943 class ListenData : public PerceiveData 944 { 945 protected: 946 /// Construct a ListenData class definition. 947 ListenData(ListenData *defaults = NULL) : 948 PerceiveData((PerceiveData*)defaults) 949 { 950 m_class_no = LISTEN_NO; 951 } 952 /// Default destructor. 953 virtual ~ListenData(); 954 955 public: 956 /// Copy this object. 957 virtual ListenData * copy() const; 958 959 /// Is this instance of some class? 960 virtual bool instanceOf(int classNo) const; 961 962 iterate(int & current_class,std::string & attr)963 virtual void iterate(int& current_class, std::string& attr) const 964 {if(current_class == LISTEN_NO) current_class = -1; PerceiveData::iterate(current_class, attr);} 965 966 //freelist related things 967 public: 968 static ListenData *alloc(); 969 virtual void free(); 970 971 /// \brief Get the reference object that contains the default values for 972 /// attributes of instances of the same class as this object. 973 /// 974 /// @return a pointer to the default object. 975 virtual ListenData *getDefaultObject(); 976 977 /// \brief Get the reference object that contains the default values for 978 /// attributes of instances of this class. 979 /// 980 /// @return a pointer to the default object. 981 static ListenData *getDefaultObjectInstance(); 982 private: 983 static ListenData *defaults_ListenData; 984 static ListenData *begin_ListenData; 985 }; 986 987 988 /** Sniff something 989 990 This is base operation for all other 991 operations and defines basic attributes. You can use this as 992 starting point for browsing whole operation hiearchy. refno refers 993 to operation this is reply for. In examples all attributes that 994 are just as examples (and thus world specific) are started with 'e_'. 995 996 */ 997 998 class SniffData; 999 typedef SmartPtr<SniffData> Sniff; 1000 1001 static const int SNIFF_NO = 25; 1002 1003 /// \brief Sniff something. 1004 /// 1005 /** This is base operation for all other 1006 operations and defines basic attributes. You can use this as 1007 starting point for browsing whole operation hiearchy. refno refers 1008 to operation this is reply for. In examples all attributes that 1009 are just as examples (and thus world specific) are started with 'e_'. 1010 */ 1011 class SniffData : public PerceiveData 1012 { 1013 protected: 1014 /// Construct a SniffData class definition. 1015 SniffData(SniffData *defaults = NULL) : 1016 PerceiveData((PerceiveData*)defaults) 1017 { 1018 m_class_no = SNIFF_NO; 1019 } 1020 /// Default destructor. 1021 virtual ~SniffData(); 1022 1023 public: 1024 /// Copy this object. 1025 virtual SniffData * copy() const; 1026 1027 /// Is this instance of some class? 1028 virtual bool instanceOf(int classNo) const; 1029 1030 iterate(int & current_class,std::string & attr)1031 virtual void iterate(int& current_class, std::string& attr) const 1032 {if(current_class == SNIFF_NO) current_class = -1; PerceiveData::iterate(current_class, attr);} 1033 1034 //freelist related things 1035 public: 1036 static SniffData *alloc(); 1037 virtual void free(); 1038 1039 /// \brief Get the reference object that contains the default values for 1040 /// attributes of instances of the same class as this object. 1041 /// 1042 /// @return a pointer to the default object. 1043 virtual SniffData *getDefaultObject(); 1044 1045 /// \brief Get the reference object that contains the default values for 1046 /// attributes of instances of this class. 1047 /// 1048 /// @return a pointer to the default object. 1049 static SniffData *getDefaultObjectInstance(); 1050 private: 1051 static SniffData *defaults_SniffData; 1052 static SniffData *begin_SniffData; 1053 }; 1054 1055 1056 /** Touch something 1057 1058 This is base operation for all other 1059 operations and defines basic attributes. You can use this as 1060 starting point for browsing whole operation hiearchy. refno refers 1061 to operation this is reply for. In examples all attributes that 1062 are just as examples (and thus world specific) are started with 'e_'. 1063 1064 */ 1065 1066 class TouchData; 1067 typedef SmartPtr<TouchData> Touch; 1068 1069 static const int TOUCH_NO = 26; 1070 1071 /// \brief Touch something. 1072 /// 1073 /** This is base operation for all other 1074 operations and defines basic attributes. You can use this as 1075 starting point for browsing whole operation hiearchy. refno refers 1076 to operation this is reply for. In examples all attributes that 1077 are just as examples (and thus world specific) are started with 'e_'. 1078 */ 1079 class TouchData : public PerceiveData 1080 { 1081 protected: 1082 /// Construct a TouchData class definition. 1083 TouchData(TouchData *defaults = NULL) : 1084 PerceiveData((PerceiveData*)defaults) 1085 { 1086 m_class_no = TOUCH_NO; 1087 } 1088 /// Default destructor. 1089 virtual ~TouchData(); 1090 1091 public: 1092 /// Copy this object. 1093 virtual TouchData * copy() const; 1094 1095 /// Is this instance of some class? 1096 virtual bool instanceOf(int classNo) const; 1097 1098 iterate(int & current_class,std::string & attr)1099 virtual void iterate(int& current_class, std::string& attr) const 1100 {if(current_class == TOUCH_NO) current_class = -1; PerceiveData::iterate(current_class, attr);} 1101 1102 //freelist related things 1103 public: 1104 static TouchData *alloc(); 1105 virtual void free(); 1106 1107 /// \brief Get the reference object that contains the default values for 1108 /// attributes of instances of the same class as this object. 1109 /// 1110 /// @return a pointer to the default object. 1111 virtual TouchData *getDefaultObject(); 1112 1113 /// \brief Get the reference object that contains the default values for 1114 /// attributes of instances of this class. 1115 /// 1116 /// @return a pointer to the default object. 1117 static TouchData *getDefaultObjectInstance(); 1118 private: 1119 static TouchData *defaults_TouchData; 1120 static TouchData *begin_TouchData; 1121 }; 1122 1123 1124 /** Operation for logging into server 1125 1126 For more about <a href="login.html">out of game atlas here</a> 1127 1128 */ 1129 1130 class LoginData; 1131 typedef SmartPtr<LoginData> Login; 1132 1133 static const int LOGIN_NO = 27; 1134 1135 /// \brief Operation for logging into server. 1136 /// 1137 /** For more about <a href="login.html">out of game atlas here</a> 1138 */ 1139 class LoginData : public GetData 1140 { 1141 protected: 1142 /// Construct a LoginData class definition. 1143 LoginData(LoginData *defaults = NULL) : 1144 GetData((GetData*)defaults) 1145 { 1146 m_class_no = LOGIN_NO; 1147 } 1148 /// Default destructor. 1149 virtual ~LoginData(); 1150 1151 public: 1152 /// Copy this object. 1153 virtual LoginData * copy() const; 1154 1155 /// Is this instance of some class? 1156 virtual bool instanceOf(int classNo) const; 1157 1158 iterate(int & current_class,std::string & attr)1159 virtual void iterate(int& current_class, std::string& attr) const 1160 {if(current_class == LOGIN_NO) current_class = -1; GetData::iterate(current_class, attr);} 1161 1162 //freelist related things 1163 public: 1164 static LoginData *alloc(); 1165 virtual void free(); 1166 1167 /// \brief Get the reference object that contains the default values for 1168 /// attributes of instances of the same class as this object. 1169 /// 1170 /// @return a pointer to the default object. 1171 virtual LoginData *getDefaultObject(); 1172 1173 /// \brief Get the reference object that contains the default values for 1174 /// attributes of instances of this class. 1175 /// 1176 /// @return a pointer to the default object. 1177 static LoginData *getDefaultObjectInstance(); 1178 private: 1179 static LoginData *defaults_LoginData; 1180 static LoginData *begin_LoginData; 1181 }; 1182 1183 1184 /** Operation for logging out 1185 1186 For more about <a href="login.html">out of game atlas here</a> 1187 1188 */ 1189 1190 class LogoutData; 1191 typedef SmartPtr<LogoutData> Logout; 1192 1193 static const int LOGOUT_NO = 28; 1194 1195 /// \brief Operation for logging out. 1196 /// 1197 /** For more about <a href="login.html">out of game atlas here</a> 1198 */ 1199 class LogoutData : public LoginData 1200 { 1201 protected: 1202 /// Construct a LogoutData class definition. 1203 LogoutData(LogoutData *defaults = NULL) : 1204 LoginData((LoginData*)defaults) 1205 { 1206 m_class_no = LOGOUT_NO; 1207 } 1208 /// Default destructor. 1209 virtual ~LogoutData(); 1210 1211 public: 1212 /// Copy this object. 1213 virtual LogoutData * copy() const; 1214 1215 /// Is this instance of some class? 1216 virtual bool instanceOf(int classNo) const; 1217 1218 iterate(int & current_class,std::string & attr)1219 virtual void iterate(int& current_class, std::string& attr) const 1220 {if(current_class == LOGOUT_NO) current_class = -1; LoginData::iterate(current_class, attr);} 1221 1222 //freelist related things 1223 public: 1224 static LogoutData *alloc(); 1225 virtual void free(); 1226 1227 /// \brief Get the reference object that contains the default values for 1228 /// attributes of instances of the same class as this object. 1229 /// 1230 /// @return a pointer to the default object. 1231 virtual LogoutData *getDefaultObject(); 1232 1233 /// \brief Get the reference object that contains the default values for 1234 /// attributes of instances of this class. 1235 /// 1236 /// @return a pointer to the default object. 1237 static LogoutData *getDefaultObjectInstance(); 1238 private: 1239 static LogoutData *defaults_LogoutData; 1240 static LogoutData *begin_LogoutData; 1241 }; 1242 1243 1244 /** When something is not yet implemented in server, then character can pretend to do something ;-) 1245 1246 This is base operation for all other 1247 operations and defines basic attributes. You can use this as 1248 starting point for browsing whole operation hiearchy. refno refers 1249 to operation this is reply for. In examples all attributes that 1250 are just as examples (and thus world specific) are started with 'e_'. 1251 1252 */ 1253 1254 class ImaginaryData; 1255 typedef SmartPtr<ImaginaryData> Imaginary; 1256 1257 static const int IMAGINARY_NO = 29; 1258 1259 /// \brief When something is not yet implemented in server, then character can pretend to do something ;-). 1260 /// 1261 /** This is base operation for all other 1262 operations and defines basic attributes. You can use this as 1263 starting point for browsing whole operation hiearchy. refno refers 1264 to operation this is reply for. In examples all attributes that 1265 are just as examples (and thus world specific) are started with 'e_'. 1266 */ 1267 class ImaginaryData : public ActionData 1268 { 1269 protected: 1270 /// Construct a ImaginaryData class definition. 1271 ImaginaryData(ImaginaryData *defaults = NULL) : 1272 ActionData((ActionData*)defaults) 1273 { 1274 m_class_no = IMAGINARY_NO; 1275 } 1276 /// Default destructor. 1277 virtual ~ImaginaryData(); 1278 1279 public: 1280 /// Copy this object. 1281 virtual ImaginaryData * copy() const; 1282 1283 /// Is this instance of some class? 1284 virtual bool instanceOf(int classNo) const; 1285 1286 iterate(int & current_class,std::string & attr)1287 virtual void iterate(int& current_class, std::string& attr) const 1288 {if(current_class == IMAGINARY_NO) current_class = -1; ActionData::iterate(current_class, attr);} 1289 1290 //freelist related things 1291 public: 1292 static ImaginaryData *alloc(); 1293 virtual void free(); 1294 1295 /// \brief Get the reference object that contains the default values for 1296 /// attributes of instances of the same class as this object. 1297 /// 1298 /// @return a pointer to the default object. 1299 virtual ImaginaryData *getDefaultObject(); 1300 1301 /// \brief Get the reference object that contains the default values for 1302 /// attributes of instances of this class. 1303 /// 1304 /// @return a pointer to the default object. 1305 static ImaginaryData *getDefaultObjectInstance(); 1306 private: 1307 static ImaginaryData *defaults_ImaginaryData; 1308 static ImaginaryData *begin_ImaginaryData; 1309 }; 1310 1311 1312 /** Use a currently wielded tool. 1313 1314 This is base operation for all other 1315 operations and defines basic attributes. You can use this as 1316 starting point for browsing whole operation hiearchy. refno refers 1317 to operation this is reply for. In examples all attributes that 1318 are just as examples (and thus world specific) are started with 'e_'. 1319 1320 */ 1321 1322 class UseData; 1323 typedef SmartPtr<UseData> Use; 1324 1325 static const int USE_NO = 30; 1326 1327 /// \brief Use a currently wielded tool.. 1328 /// 1329 /** This is base operation for all other 1330 operations and defines basic attributes. You can use this as 1331 starting point for browsing whole operation hiearchy. refno refers 1332 to operation this is reply for. In examples all attributes that 1333 are just as examples (and thus world specific) are started with 'e_'. 1334 */ 1335 class UseData : public ActionData 1336 { 1337 protected: 1338 /// Construct a UseData class definition. 1339 UseData(UseData *defaults = NULL) : 1340 ActionData((ActionData*)defaults) 1341 { 1342 m_class_no = USE_NO; 1343 } 1344 /// Default destructor. 1345 virtual ~UseData(); 1346 1347 public: 1348 /// Copy this object. 1349 virtual UseData * copy() const; 1350 1351 /// Is this instance of some class? 1352 virtual bool instanceOf(int classNo) const; 1353 1354 iterate(int & current_class,std::string & attr)1355 virtual void iterate(int& current_class, std::string& attr) const 1356 {if(current_class == USE_NO) current_class = -1; ActionData::iterate(current_class, attr);} 1357 1358 //freelist related things 1359 public: 1360 static UseData *alloc(); 1361 virtual void free(); 1362 1363 /// \brief Get the reference object that contains the default values for 1364 /// attributes of instances of the same class as this object. 1365 /// 1366 /// @return a pointer to the default object. 1367 virtual UseData *getDefaultObject(); 1368 1369 /// \brief Get the reference object that contains the default values for 1370 /// attributes of instances of this class. 1371 /// 1372 /// @return a pointer to the default object. 1373 static UseData *getDefaultObjectInstance(); 1374 private: 1375 static UseData *defaults_UseData; 1376 static UseData *begin_UseData; 1377 }; 1378 1379 1380 /** This is base operator for operations that tell you info about objects or events. 1381 1382 This is base operation for all other 1383 operations and defines basic attributes. You can use this as 1384 starting point for browsing whole operation hiearchy. refno refers 1385 to operation this is reply for. In examples all attributes that 1386 are just as examples (and thus world specific) are started with 'e_'. 1387 1388 */ 1389 1390 class InfoData; 1391 typedef SmartPtr<InfoData> Info; 1392 1393 static const int INFO_NO = 31; 1394 1395 /// \brief This is base operator for operations that tell you info about objects or events.. 1396 /// 1397 /** This is base operation for all other 1398 operations and defines basic attributes. You can use this as 1399 starting point for browsing whole operation hiearchy. refno refers 1400 to operation this is reply for. In examples all attributes that 1401 are just as examples (and thus world specific) are started with 'e_'. 1402 */ 1403 class InfoData : public RootOperationData 1404 { 1405 protected: 1406 /// Construct a InfoData class definition. 1407 InfoData(InfoData *defaults = NULL) : 1408 RootOperationData((RootOperationData*)defaults) 1409 { 1410 m_class_no = INFO_NO; 1411 } 1412 /// Default destructor. 1413 virtual ~InfoData(); 1414 1415 public: 1416 /// Copy this object. 1417 virtual InfoData * copy() const; 1418 1419 /// Is this instance of some class? 1420 virtual bool instanceOf(int classNo) const; 1421 1422 iterate(int & current_class,std::string & attr)1423 virtual void iterate(int& current_class, std::string& attr) const 1424 {if(current_class == INFO_NO) current_class = -1; RootOperationData::iterate(current_class, attr);} 1425 1426 //freelist related things 1427 public: 1428 static InfoData *alloc(); 1429 virtual void free(); 1430 1431 /// \brief Get the reference object that contains the default values for 1432 /// attributes of instances of the same class as this object. 1433 /// 1434 /// @return a pointer to the default object. 1435 virtual InfoData *getDefaultObject(); 1436 1437 /// \brief Get the reference object that contains the default values for 1438 /// attributes of instances of this class. 1439 /// 1440 /// @return a pointer to the default object. 1441 static InfoData *getDefaultObjectInstance(); 1442 private: 1443 static InfoData *defaults_InfoData; 1444 static InfoData *begin_InfoData; 1445 }; 1446 1447 1448 /** Character perceives something. 1449 1450 Base operator for all kind of perceptions 1451 1452 */ 1453 1454 class PerceptionData; 1455 typedef SmartPtr<PerceptionData> Perception; 1456 1457 static const int PERCEPTION_NO = 32; 1458 1459 /// \brief Character perceives something.. 1460 /// 1461 /** Base operator for all kind of perceptions 1462 */ 1463 class PerceptionData : public InfoData 1464 { 1465 protected: 1466 /// Construct a PerceptionData class definition. 1467 PerceptionData(PerceptionData *defaults = NULL) : 1468 InfoData((InfoData*)defaults) 1469 { 1470 m_class_no = PERCEPTION_NO; 1471 } 1472 /// Default destructor. 1473 virtual ~PerceptionData(); 1474 1475 public: 1476 /// Copy this object. 1477 virtual PerceptionData * copy() const; 1478 1479 /// Is this instance of some class? 1480 virtual bool instanceOf(int classNo) const; 1481 1482 iterate(int & current_class,std::string & attr)1483 virtual void iterate(int& current_class, std::string& attr) const 1484 {if(current_class == PERCEPTION_NO) current_class = -1; InfoData::iterate(current_class, attr);} 1485 1486 //freelist related things 1487 public: 1488 static PerceptionData *alloc(); 1489 virtual void free(); 1490 1491 /// \brief Get the reference object that contains the default values for 1492 /// attributes of instances of the same class as this object. 1493 /// 1494 /// @return a pointer to the default object. 1495 virtual PerceptionData *getDefaultObject(); 1496 1497 /// \brief Get the reference object that contains the default values for 1498 /// attributes of instances of this class. 1499 /// 1500 /// @return a pointer to the default object. 1501 static PerceptionData *getDefaultObjectInstance(); 1502 private: 1503 static PerceptionData *defaults_PerceptionData; 1504 static PerceptionData *begin_PerceptionData; 1505 }; 1506 1507 1508 /** Character sees something 1509 1510 Base operator for all kind of perceptions 1511 1512 */ 1513 1514 class SightData; 1515 typedef SmartPtr<SightData> Sight; 1516 1517 static const int SIGHT_NO = 33; 1518 1519 /// \brief Character sees something. 1520 /// 1521 /** Base operator for all kind of perceptions 1522 */ 1523 class SightData : public PerceptionData 1524 { 1525 protected: 1526 /// Construct a SightData class definition. 1527 SightData(SightData *defaults = NULL) : 1528 PerceptionData((PerceptionData*)defaults) 1529 { 1530 m_class_no = SIGHT_NO; 1531 } 1532 /// Default destructor. 1533 virtual ~SightData(); 1534 1535 public: 1536 /// Copy this object. 1537 virtual SightData * copy() const; 1538 1539 /// Is this instance of some class? 1540 virtual bool instanceOf(int classNo) const; 1541 1542 iterate(int & current_class,std::string & attr)1543 virtual void iterate(int& current_class, std::string& attr) const 1544 {if(current_class == SIGHT_NO) current_class = -1; PerceptionData::iterate(current_class, attr);} 1545 1546 //freelist related things 1547 public: 1548 static SightData *alloc(); 1549 virtual void free(); 1550 1551 /// \brief Get the reference object that contains the default values for 1552 /// attributes of instances of the same class as this object. 1553 /// 1554 /// @return a pointer to the default object. 1555 virtual SightData *getDefaultObject(); 1556 1557 /// \brief Get the reference object that contains the default values for 1558 /// attributes of instances of this class. 1559 /// 1560 /// @return a pointer to the default object. 1561 static SightData *getDefaultObjectInstance(); 1562 private: 1563 static SightData *defaults_SightData; 1564 static SightData *begin_SightData; 1565 }; 1566 1567 1568 /** Character sees something appearing: it literally appears or has it come in visible range 1569 1570 Base operator for all kind of perceptions 1571 1572 */ 1573 1574 class AppearanceData; 1575 typedef SmartPtr<AppearanceData> Appearance; 1576 1577 static const int APPEARANCE_NO = 34; 1578 1579 /// \brief Character sees something appearing: it literally appears or has it come in visible range. 1580 /// 1581 /** Base operator for all kind of perceptions 1582 */ 1583 class AppearanceData : public SightData 1584 { 1585 protected: 1586 /// Construct a AppearanceData class definition. 1587 AppearanceData(AppearanceData *defaults = NULL) : 1588 SightData((SightData*)defaults) 1589 { 1590 m_class_no = APPEARANCE_NO; 1591 } 1592 /// Default destructor. 1593 virtual ~AppearanceData(); 1594 1595 public: 1596 /// Copy this object. 1597 virtual AppearanceData * copy() const; 1598 1599 /// Is this instance of some class? 1600 virtual bool instanceOf(int classNo) const; 1601 1602 iterate(int & current_class,std::string & attr)1603 virtual void iterate(int& current_class, std::string& attr) const 1604 {if(current_class == APPEARANCE_NO) current_class = -1; SightData::iterate(current_class, attr);} 1605 1606 //freelist related things 1607 public: 1608 static AppearanceData *alloc(); 1609 virtual void free(); 1610 1611 /// \brief Get the reference object that contains the default values for 1612 /// attributes of instances of the same class as this object. 1613 /// 1614 /// @return a pointer to the default object. 1615 virtual AppearanceData *getDefaultObject(); 1616 1617 /// \brief Get the reference object that contains the default values for 1618 /// attributes of instances of this class. 1619 /// 1620 /// @return a pointer to the default object. 1621 static AppearanceData *getDefaultObjectInstance(); 1622 private: 1623 static AppearanceData *defaults_AppearanceData; 1624 static AppearanceData *begin_AppearanceData; 1625 }; 1626 1627 1628 /** Character sees something disappearing: it literally disappears or has it gone too far to be visible 1629 1630 Base operator for all kind of perceptions 1631 1632 */ 1633 1634 class DisappearanceData; 1635 typedef SmartPtr<DisappearanceData> Disappearance; 1636 1637 static const int DISAPPEARANCE_NO = 35; 1638 1639 /// \brief Character sees something disappearing: it literally disappears or has it gone too far to be visible. 1640 /// 1641 /** Base operator for all kind of perceptions 1642 */ 1643 class DisappearanceData : public SightData 1644 { 1645 protected: 1646 /// Construct a DisappearanceData class definition. 1647 DisappearanceData(DisappearanceData *defaults = NULL) : 1648 SightData((SightData*)defaults) 1649 { 1650 m_class_no = DISAPPEARANCE_NO; 1651 } 1652 /// Default destructor. 1653 virtual ~DisappearanceData(); 1654 1655 public: 1656 /// Copy this object. 1657 virtual DisappearanceData * copy() const; 1658 1659 /// Is this instance of some class? 1660 virtual bool instanceOf(int classNo) const; 1661 1662 iterate(int & current_class,std::string & attr)1663 virtual void iterate(int& current_class, std::string& attr) const 1664 {if(current_class == DISAPPEARANCE_NO) current_class = -1; SightData::iterate(current_class, attr);} 1665 1666 //freelist related things 1667 public: 1668 static DisappearanceData *alloc(); 1669 virtual void free(); 1670 1671 /// \brief Get the reference object that contains the default values for 1672 /// attributes of instances of the same class as this object. 1673 /// 1674 /// @return a pointer to the default object. 1675 virtual DisappearanceData *getDefaultObject(); 1676 1677 /// \brief Get the reference object that contains the default values for 1678 /// attributes of instances of this class. 1679 /// 1680 /// @return a pointer to the default object. 1681 static DisappearanceData *getDefaultObjectInstance(); 1682 private: 1683 static DisappearanceData *defaults_DisappearanceData; 1684 static DisappearanceData *begin_DisappearanceData; 1685 }; 1686 1687 1688 /** Character hears something 1689 1690 Base operator for all kind of perceptions 1691 1692 */ 1693 1694 class SoundData; 1695 typedef SmartPtr<SoundData> Sound; 1696 1697 static const int SOUND_NO = 36; 1698 1699 /// \brief Character hears something. 1700 /// 1701 /** Base operator for all kind of perceptions 1702 */ 1703 class SoundData : public PerceptionData 1704 { 1705 protected: 1706 /// Construct a SoundData class definition. 1707 SoundData(SoundData *defaults = NULL) : 1708 PerceptionData((PerceptionData*)defaults) 1709 { 1710 m_class_no = SOUND_NO; 1711 } 1712 /// Default destructor. 1713 virtual ~SoundData(); 1714 1715 public: 1716 /// Copy this object. 1717 virtual SoundData * copy() const; 1718 1719 /// Is this instance of some class? 1720 virtual bool instanceOf(int classNo) const; 1721 1722 iterate(int & current_class,std::string & attr)1723 virtual void iterate(int& current_class, std::string& attr) const 1724 {if(current_class == SOUND_NO) current_class = -1; PerceptionData::iterate(current_class, attr);} 1725 1726 //freelist related things 1727 public: 1728 static SoundData *alloc(); 1729 virtual void free(); 1730 1731 /// \brief Get the reference object that contains the default values for 1732 /// attributes of instances of the same class as this object. 1733 /// 1734 /// @return a pointer to the default object. 1735 virtual SoundData *getDefaultObject(); 1736 1737 /// \brief Get the reference object that contains the default values for 1738 /// attributes of instances of this class. 1739 /// 1740 /// @return a pointer to the default object. 1741 static SoundData *getDefaultObjectInstance(); 1742 private: 1743 static SoundData *defaults_SoundData; 1744 static SoundData *begin_SoundData; 1745 }; 1746 1747 1748 /** Character smells something 1749 1750 Base operator for all kind of perceptions 1751 1752 */ 1753 1754 class SmellData; 1755 typedef SmartPtr<SmellData> Smell; 1756 1757 static const int SMELL_NO = 37; 1758 1759 /// \brief Character smells something. 1760 /// 1761 /** Base operator for all kind of perceptions 1762 */ 1763 class SmellData : public PerceptionData 1764 { 1765 protected: 1766 /// Construct a SmellData class definition. 1767 SmellData(SmellData *defaults = NULL) : 1768 PerceptionData((PerceptionData*)defaults) 1769 { 1770 m_class_no = SMELL_NO; 1771 } 1772 /// Default destructor. 1773 virtual ~SmellData(); 1774 1775 public: 1776 /// Copy this object. 1777 virtual SmellData * copy() const; 1778 1779 /// Is this instance of some class? 1780 virtual bool instanceOf(int classNo) const; 1781 1782 iterate(int & current_class,std::string & attr)1783 virtual void iterate(int& current_class, std::string& attr) const 1784 {if(current_class == SMELL_NO) current_class = -1; PerceptionData::iterate(current_class, attr);} 1785 1786 //freelist related things 1787 public: 1788 static SmellData *alloc(); 1789 virtual void free(); 1790 1791 /// \brief Get the reference object that contains the default values for 1792 /// attributes of instances of the same class as this object. 1793 /// 1794 /// @return a pointer to the default object. 1795 virtual SmellData *getDefaultObject(); 1796 1797 /// \brief Get the reference object that contains the default values for 1798 /// attributes of instances of this class. 1799 /// 1800 /// @return a pointer to the default object. 1801 static SmellData *getDefaultObjectInstance(); 1802 private: 1803 static SmellData *defaults_SmellData; 1804 static SmellData *begin_SmellData; 1805 }; 1806 1807 1808 /** Character feels something (with fingers usually) 1809 1810 Base operator for all kind of perceptions 1811 1812 */ 1813 1814 class FeelData; 1815 typedef SmartPtr<FeelData> Feel; 1816 1817 static const int FEEL_NO = 38; 1818 1819 /// \brief Character feels something (with fingers usually). 1820 /// 1821 /** Base operator for all kind of perceptions 1822 */ 1823 class FeelData : public PerceptionData 1824 { 1825 protected: 1826 /// Construct a FeelData class definition. 1827 FeelData(FeelData *defaults = NULL) : 1828 PerceptionData((PerceptionData*)defaults) 1829 { 1830 m_class_no = FEEL_NO; 1831 } 1832 /// Default destructor. 1833 virtual ~FeelData(); 1834 1835 public: 1836 /// Copy this object. 1837 virtual FeelData * copy() const; 1838 1839 /// Is this instance of some class? 1840 virtual bool instanceOf(int classNo) const; 1841 1842 iterate(int & current_class,std::string & attr)1843 virtual void iterate(int& current_class, std::string& attr) const 1844 {if(current_class == FEEL_NO) current_class = -1; PerceptionData::iterate(current_class, attr);} 1845 1846 //freelist related things 1847 public: 1848 static FeelData *alloc(); 1849 virtual void free(); 1850 1851 /// \brief Get the reference object that contains the default values for 1852 /// attributes of instances of the same class as this object. 1853 /// 1854 /// @return a pointer to the default object. 1855 virtual FeelData *getDefaultObject(); 1856 1857 /// \brief Get the reference object that contains the default values for 1858 /// attributes of instances of this class. 1859 /// 1860 /// @return a pointer to the default object. 1861 static FeelData *getDefaultObjectInstance(); 1862 private: 1863 static FeelData *defaults_FeelData; 1864 static FeelData *begin_FeelData; 1865 }; 1866 1867 1868 /** Something went wrong 1869 1870 This is base operation for all other 1871 operations and defines basic attributes. You can use this as 1872 starting point for browsing whole operation hiearchy. refno refers 1873 to operation this is reply for. In examples all attributes that 1874 are just as examples (and thus world specific) are started with 'e_'. 1875 1876 */ 1877 1878 class ErrorData; 1879 typedef SmartPtr<ErrorData> Error; 1880 1881 static const int ERROR_NO = 39; 1882 1883 /// \brief Something went wrong. 1884 /// 1885 /** This is base operation for all other 1886 operations and defines basic attributes. You can use this as 1887 starting point for browsing whole operation hiearchy. refno refers 1888 to operation this is reply for. In examples all attributes that 1889 are just as examples (and thus world specific) are started with 'e_'. 1890 */ 1891 class ErrorData : public InfoData 1892 { 1893 protected: 1894 /// Construct a ErrorData class definition. 1895 ErrorData(ErrorData *defaults = NULL) : 1896 InfoData((InfoData*)defaults) 1897 { 1898 m_class_no = ERROR_NO; 1899 } 1900 /// Default destructor. 1901 virtual ~ErrorData(); 1902 1903 public: 1904 /// Copy this object. 1905 virtual ErrorData * copy() const; 1906 1907 /// Is this instance of some class? 1908 virtual bool instanceOf(int classNo) const; 1909 1910 iterate(int & current_class,std::string & attr)1911 virtual void iterate(int& current_class, std::string& attr) const 1912 {if(current_class == ERROR_NO) current_class = -1; InfoData::iterate(current_class, attr);} 1913 1914 //freelist related things 1915 public: 1916 static ErrorData *alloc(); 1917 virtual void free(); 1918 1919 /// \brief Get the reference object that contains the default values for 1920 /// attributes of instances of the same class as this object. 1921 /// 1922 /// @return a pointer to the default object. 1923 virtual ErrorData *getDefaultObject(); 1924 1925 /// \brief Get the reference object that contains the default values for 1926 /// attributes of instances of this class. 1927 /// 1928 /// @return a pointer to the default object. 1929 static ErrorData *getDefaultObjectInstance(); 1930 private: 1931 static ErrorData *defaults_ErrorData; 1932 static ErrorData *begin_ErrorData; 1933 }; 1934 1935 } } } // namespace Atlas::Objects::Operation 1936 1937 #endif // ATLAS_OBJECTS_OPERATION_OPERATION_H 1938