dca_interface  6.3.4
url_classification_result.h
Go to the documentation of this file.
1 /* IBM Source Code */
2 /* (C) Copyright IBM Corp. 2009, 2012 */
3 /* Licensed Materials - Property of IBM */
4 /* US Government Users Restricted Rights - Use duplication or disclosure restricted by GSA Schedule Contract with IBM Corp. */
5 
6 #ifndef URL_CLASSIFICATION_RESULT_H
7 #define URL_CLASSIFICATION_RESULT_H
8 
15 namespace dca {
16 
22 
23  class urlclassification_result_p;
24 
32  {
33  public:
37  UrlClassificationResults& operator = ( const UrlClassificationResults& rhi );
38  virtual ~UrlClassificationResults();
40 
66 
68  bool isUnknownUrl() const;
70  bool isCategorized() const;
76  bool contains( DCA_CATEGORY_ID_TYPE catid ) const;
77 
79  PRIVATE_PTR urlclassification_result_p *_p;
80  };
81 
82 }
83 
84 #endif
bool isCategorized() const
Returns whether or not the URL matched one or more categories.
UrlClassificationResult at(DCA_INDEX_TYPE index) const
Returns one result of the matched results (if any) with the given index.
bool isUnknownUrl() const
Returns whether a URL is known or unknown. A URL is unknown if it is not contained in the database.
DCA_CATEGORY_ID_TYPE UrlClassificationResult
The item of an URL classification result is typedef'd as DCA_CATEGORY_ID_TYPE.
Results of an URL classification.
bool contains(DCA_CATEGORY_ID_TYPE catid) const
Fast method to see whether the results contain a given category or not.
int DCA_CATEGORY_ID_TYPE
Type for category ids.
Definition: base_types.h:31
size_t DCA_INDEX_TYPE
Type for index access (used for arrays and collections).
Definition: base_types.h:66
size_t DCA_SIZE_TYPE
Type for size (used for size of array and collections).
Definition: base_types.h:72
UrlClassificationResult operator[](DCA_INDEX_TYPE index) const
Similar to at() but allows a more C++ style access.
#define PRIVATE_PTR
Type for private pointer implementations, for internal use only.
Definition: base_types.h:83
DCA_SIZE_TYPE size() const
Returns the number of results in the container.