1 /* 2 * Copyright 2013, Stephan Aßmus <superstippi@gmx.de>. 3 * All rights reserved. Distributed under the terms of the MIT License. 4 */ 5 #ifndef BULLET_DATA_H 6 #define BULLET_DATA_H 7 8 #include <Referenceable.h> 9 #include <String.h> 10 11 12 class BulletData; 13 typedef BReference<BulletData> BulletDataRef; 14 15 16 // You cannot modify a BulletData object once it has been created. 17 class BulletData : public BReferenceable { 18 public: 19 BulletData(); 20 BulletData(const BString& string, 21 float spacing); 22 BulletData(const BulletData& other); 23 24 bool operator==( 25 const BulletData& other) const; 26 bool operator!=( 27 const BulletData& other) const; 28 29 BulletDataRef SetString(const BString& string); 30 inline const BString& String() const 31 { return fString; } 32 33 BulletDataRef SetSpacing(float spacing); 34 inline float Spacing() const 35 { return fSpacing; } 36 37 private: 38 BulletData& operator=(const BulletData& other); 39 40 private: 41 BString fString; 42 float fSpacing; 43 }; 44 45 46 #endif // BULLET_DATA_H 47