object.h 3.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. #ifndef __OBJECT_H
  2. #define __OBJECT_H
  3. //*****************************************************************************
  4. //
  5. // object.h
  6. //
  7. // Contains the basic interface for working with the object data structure, and
  8. // the functions needed to interact with it. If you plan on adding any other
  9. // information to objects, it is strongly suggested you do so through auxiliary
  10. // data (see auxiliary.h).
  11. //
  12. // For a recap, IF YOU PLAN ON ADDING ANY OTHER INFORMATION TO OBJECTS, IT
  13. // IS STRONGLY SUGGESTED YOU DO SO THROUGH AUXILIARY DATA (see auxiliary.h).
  14. //
  15. //*****************************************************************************
  16. OBJ_DATA *newObj ();
  17. void deleteObj (OBJ_DATA *obj);
  18. OBJ_DATA *objRead (STORAGE_SET *set);
  19. STORAGE_SET *objStore (OBJ_DATA *obj);
  20. void objCopyTo (OBJ_DATA *from, OBJ_DATA *to);
  21. OBJ_DATA *objCopy (OBJ_DATA *obj);
  22. bool objIsInstance (OBJ_DATA *obj, const char *prototype);
  23. bool objIsName (OBJ_DATA *obj, const char *name);
  24. void objAddChar (OBJ_DATA *obj, CHAR_DATA *ch);
  25. void objRemoveChar (OBJ_DATA *obj, CHAR_DATA *ch);
  26. //*****************************************************************************
  27. // set and get functions
  28. //*****************************************************************************
  29. const char *objGetClass (OBJ_DATA *obj);
  30. const char *objGetPrototypes(OBJ_DATA *obj);
  31. const char *objGetName (OBJ_DATA *obj);
  32. const char *objGetKeywords (OBJ_DATA *obj);
  33. const char *objGetRdesc (OBJ_DATA *obj);
  34. const char *objGetDesc (OBJ_DATA *obj);
  35. const char *objGetMultiName (OBJ_DATA *obj);
  36. const char *objGetMultiRdesc(OBJ_DATA *obj);
  37. EDESC_SET *objGetEdescs (OBJ_DATA *obj);
  38. const char *objGetEdesc (OBJ_DATA *obj, const char *keyword);
  39. const char *objGetInstances (OBJ_DATA *obj);
  40. BUFFER *objGetDescBuffer(OBJ_DATA *obj);
  41. CHAR_DATA *objGetCarrier (OBJ_DATA *obj);
  42. CHAR_DATA *objGetWearer (OBJ_DATA *obj);
  43. OBJ_DATA *objGetContainer (OBJ_DATA *obj);
  44. ROOM_DATA *objGetRoom (OBJ_DATA *obj);
  45. LIST *objGetContents (OBJ_DATA *obj);
  46. LIST *objGetUsers (OBJ_DATA *obj);
  47. int objGetUID (OBJ_DATA *obj);
  48. time_t objGetBirth (OBJ_DATA *obj);
  49. double objGetWeight (OBJ_DATA *obj);
  50. double objGetWeightRaw (OBJ_DATA *obj);
  51. void *objGetAuxiliaryData(const OBJ_DATA *obj, const char *name);
  52. BITVECTOR *objGetBits (OBJ_DATA *obj);
  53. int objGetHidden (OBJ_DATA *Obj);
  54. void objSetClass (OBJ_DATA *obj, const char *type);
  55. void objSetPrototypes(OBJ_DATA *obj, const char *type);
  56. void objAddPrototype (OBJ_DATA *obj, const char *type);
  57. void objSetName (OBJ_DATA *obj, const char *name);
  58. void objSetKeywords (OBJ_DATA *obj, const char *keywords);
  59. void objSetRdesc (OBJ_DATA *obj, const char *rdesc);
  60. void objSetDesc (OBJ_DATA *obj, const char *desc);
  61. void objSetMultiName (OBJ_DATA *obj, const char *multi_name);
  62. void objSetMultiRdesc(OBJ_DATA *obj, const char *multi_rdesc);
  63. void objSetEdescs (OBJ_DATA *obj, EDESC_SET *edesc);
  64. void objSetCarrier (OBJ_DATA *obj, CHAR_DATA *ch);
  65. void objSetWearer (OBJ_DATA *obj, CHAR_DATA *ch);
  66. void objSetContainer (OBJ_DATA *obj, OBJ_DATA *cont);
  67. void objSetRoom (OBJ_DATA *obj, ROOM_DATA *room);
  68. void objSetWeightRaw (OBJ_DATA *obj, double weight);
  69. void objSetHidden (OBJ_DATA *obj, int amnt);
  70. #endif // __OBJECT_H