Subversion Repositories public iLand

Rev

Rev 35 | Rev 39 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 35 Rev 38
Line 6... Line 6...
6
#include "grid.h"
6
#include "grid.h"
7
7
8
/** Collection of @class Stamp for one tree species.
8
/** Collection of @class Stamp for one tree species.
9
  Per species several stamps are stored (different BHD, different HD relations). This class
9
  Per species several stamps are stored (different BHD, different HD relations). This class
10
  encapsulates storage and access to these stamps. The design goal is to deliver high
10
  encapsulates storage and access to these stamps. The design goal is to deliver high
11
  access speeds for the "getStamp()" method.
-
 
-
 
11
  access speeds for the "stamp()" method.
12
  Use getStamp(bhd, hd) or getStamp(bhd, height) to access. */
12
  Use getStamp(bhd, hd) or getStamp(bhd, height) to access. */
13
class StampContainer
13
class StampContainer
14
{
14
{
15
public:
15
public:
16
    StampContainer();
16
    StampContainer();
17
    ~StampContainer();
17
    ~StampContainer();
18
    void useLookup(const bool use) { m_useLookup = use; }
18
    void useLookup(const bool use) { m_useLookup = use; }
19
    /// addStamp() add a pre-allocated stamp @param stamp to internal collection. Caller must allocate stamp on the heap,
19
    /// addStamp() add a pre-allocated stamp @param stamp to internal collection. Caller must allocate stamp on the heap,
20
    /// freeing is done by this class.
20
    /// freeing is done by this class.
21
    int addStamp(Stamp* stamp, const float bhd, const float hd_value);
21
    int addStamp(Stamp* stamp, const float bhd, const float hd_value);
22
    const Stamp* getStamp(const float bhd_cm, const float height_m);
-
 
-
 
22
    const Stamp* stamp(const float bhd_cm, const float height_m);
23
    /// save the content of the StampContainer to the output stream (binary encoding)
23
    /// save the content of the StampContainer to the output stream (binary encoding)
24
    void save(QDataStream &out);
24
    void save(QDataStream &out);
25
    /// load the content of the StampContainer to the output stream (binary encoding)
25
    /// load the content of the StampContainer to the output stream (binary encoding)
26
    void load(QDataStream &in);
26
    void load(QDataStream &in);
27
27