ULAPI  8.0
ulexample.h
1 
7 #ifndef ULEXAMPLE_H
8 #define ULEXAMPLE_H
9 
10 //#include "ulerror.h"
11 //#include "ulstring.h"
12 #include "ulcontainers.h"
13 #include "ulfeature.h"
14 #include "ulfeaturetype.h"
15 
20 class ULExample
21 {
22 public:
23  ULExample();
24  ULExample(const ULExample& other);
25  virtual ~ULExample();
26 
27  void clear();
28  ULExample& operator=(const ULExample& other);
29  bool operator==(const ULExample& other) const;
30  bool operator!=(const ULExample& other) const;
31 
32  // Accessors
33  ULString getText() const;
34  ULString getTranslation() const;
35 
36  void addFeature(const ULFeatureType& featureType, ULString value);
37  void addFeature(const ULFeature& feature);
38  void setFeature(const ULFeatureType& featureType, ULString value);
39  bool hasFeature(const ULFeatureType& featureType) const;
40  bool getFeature(const ULFeatureType& featureType, ULFeature& feature) const;
41 
42  ULString toString() const;
43 
44  const ULList<ULFeature>& getFeatureList() const;
45 
46 protected:
47  // The feature list is kept sorted for efficient comparison.
49  bool findFeature(const ULFeatureType& featureType, ULString& featureValue) const;
50 };
51 
52 #endif
53