Document Fragments Rankings. More...

#include <gdocfragmentranks.h>

Inheritance diagram for GDocFragmentRanks:
[legend]

Public Member Functions

 GDocFragmentRanks (GDocFragment *fragment)
 
int Compare (const GDocFragmentRanks &fragment) const
 
int Compare (const GDocFragment &fragment) const
 
GDocFragmentGetFragment (void) const
 
GDocFragmentRankAddRanking (double ranking, const R::RString info)
 
R::RCursor< GDocFragmentRankGetRankings (void) const
 
double GetRanking (void)
 
void SetRanking (double ranking)
 

Static Public Member Functions

static int SortOrderRanking (const void *a, const void *b)
 

Private Attributes

GDocFragmentFragment
 
double Ranking
 
- Private Attributes inherited from iRContainer< C >
C ** Tab
 
size_t NbPtr
 
size_t MaxPtr
 
size_t LastPtr
 
size_t IncPtr
 

Additional Inherited Members

- Private Member Functions inherited from RContainer< GDocFragmentRank, true, true >
 RContainer (size_t m, size_t i=0)
 
 RContainer (const RContainer< GDocFragmentRank, true, true > &src)
 
 RContainer (const RContainer< GDocFragmentRank, false, true > &src)
 
int Compare (const RContainer< GDocFragmentRank, true, true > &) const
 
size_t GetNb (void) const
 
size_t GetMaxPos (void) const
 
size_t GetMaxNb (void) const
 
size_t GetIncNb (void) const
 
bool VerifyIndex (size_t idx) const
 
void VerifyTab (size_t max=0)
 
void Clear (size_t m=0, size_t i=0, bool force=false)
 
void ReOrder (int sortOrder(const void *, const void *), size_t min, size_t max)
 
void ReOrder (int sortOrder(const void *, const void *))
 
void ReOrder (void)
 
void Exchange (size_t pos1, size_t pos2)
 
void Shift (size_t idx, bool reverse)
 
void Transfer (RContainer< GDocFragmentRank, a, o > &src)
 
RContaineroperator= (const RContainer< GDocFragmentRank, true, true > &src)
 
RContaineroperator= (const RContainer< GDocFragmentRank, false, true > &src)
 
void Copy (const RContainer< GDocFragmentRank, a, true > &src)
 
RContaineroperator+= (const RContainer< GDocFragmentRank, a, o > &src)
 
size_t GetIndex (const TUse &tag, bool &find, size_t min=0, size_t max=0) const
 
bool IsIn (const TUse &tag, bool sortkey, size_t min=0, size_t max=0) const
 
bool IsIn (const TUse &tag, size_t min=0, size_t max=0) const
 
const GDocFragmentRank * operator[] (size_t idx) const
 
GDocFragmentRank * operator[] (size_t idx)
 
const GDocFragmentRank * GetPtrAt (size_t idx) const
 
GDocFragmentRank * GetPtrAt (size_t idx)
 
GDocFragmentRank * GetPtr (const TUse &tag, bool sortkey, size_t min=0, size_t max=0) const
 
GDocFragmentRank * GetPtr (const TUse &tag, size_t min=0, size_t max=0) const
 
GDocFragmentRank * GetInsertPtr (const TUse &tag, bool sortkey, size_t min=0, size_t max=0)
 
GDocFragmentRank * GetInsertPtr (const TUse &tag, size_t min=0, size_t max=0)
 
GDocFragmentRank * GetInsertPtrAt (const TUse &tag, size_t pos)
 
RContainer< GDocFragmentRank,
false, true > * 
GetPtrs (const TUse &tag, size_t min=0, size_t max=0) const
 
size_t GetTab (const void **tab, size_t min=0, size_t max=0) const
 
size_t GetTab (void **tab, size_t min=0, size_t max=0)
 
size_t GetTab (const GDocFragmentRank **tab, size_t min=0, size_t max=0) const
 
size_t GetTab (GDocFragmentRank **tab, size_t min=0, size_t max=0)
 
void InsertPtrAt (GDocFragmentRank *ins, size_t pos, bool del)
 
void InsertPtrAt (GDocFragmentRank *ins, size_t pos)
 
void InsertPtr (GDocFragmentRank *ins, bool del=false, size_t min=0, size_t max=0)
 
void DeletePtrAt (size_t pos, bool shift, bool del)
 
void DeletePtrAt (size_t pos, bool shift)
 
void DeletePtrAt (size_t pos)
 
void DeletePtr (const TUse &tag, bool sortkey, bool del, size_t min=0, size_t max=0)
 
void DeletePtr (const TUse &tag, bool sortkey, size_t min=0, size_t max=0)
 
void DeletePtr (const TUse &tag, size_t min=0, size_t max=0)
 
void Inter (const iRContainer< GDocFragmentRank > &src1, const iRContainer< GDocFragmentRank > &src2)
 
void Union (const iRContainer< GDocFragmentRank > &src1, const iRContainer< GDocFragmentRank > &src2)
 
virtual ~RContainer (void)
 
- Private Member Functions inherited from iRContainer< C >
size_t GetNb (void) const
 
size_t GetMaxPos (void) const
 
size_t GetMaxNb (void) const
 
size_t GetIncNb (void) const
 
bool VerifyIndex (size_t idx) const
 
void VerifyTab (size_t max=0)
 
void Clear (size_t m=0, size_t i=0, bool force=false)
 
void ReOrder (int sortOrder(const void *, const void *), size_t min, size_t max)
 
void ReOrder (int sortOrder(const void *, const void *))
 
void ReOrder (void)
 
void Exchange (size_t pos1, size_t pos2)
 
void Shift (size_t idx, bool reverse)
 
void Transfer (iRContainer< C > &src)
 
iRContaineroperator= (const iRContainer< C > &src)
 
void Copy (const iRContainer< C > &src)
 
iRContaineroperator+= (const iRContainer< C > &src)
 
size_t GetIndex (bool order, const TUse &tag, bool &find, size_t min=0, size_t max=0) const
 
size_t GetIndex (const TUse &tag, bool &find, size_t min=0, size_t max=0) const
 
bool IsIn (const TUse &tag, bool sortkey, size_t min=0, size_t max=0) const
 
bool IsIn (const TUse &tag, size_t min=0, size_t max=0) const
 
const C * operator[] (size_t idx) const
 
C * operator[] (size_t idx)
 
const C * GetPtrAt (size_t idx) const
 
C * GetPtrAt (size_t idx)
 
C * GetPtr (const TUse &tag, bool sortkey, size_t min=0, size_t max=0) const
 
C * GetPtr (const TUse &tag, size_t min=0, size_t max=0) const
 
C * GetInsertPtr (const TUse &tag, bool sortkey, size_t min=0, size_t max=0)
 
C * GetInsertPtr (const TUse &tag, size_t min=0, size_t max=0)
 
C * GetInsertPtrAt (const TUse &tag, size_t pos)
 
size_t GetTab (const void **tab, size_t min=0, size_t max=0) const
 
size_t GetTab (void **tab, size_t min=0, size_t max=0)
 
size_t GetTab (const C **tab, size_t min=0, size_t max=0) const
 
size_t GetTab (C **tab, size_t min=0, size_t max=0)
 
void InsertPtrAt (C *ins, size_t pos, bool del)
 
void InsertPtrAt (C *ins, size_t pos)
 
void InsertPtr (C *ins, bool del=false, size_t min=0, size_t max=0)
 
void DeletePtrAt (size_t pos, bool shift, bool del)
 
void DeletePtrAt (size_t pos, bool shift)
 
void DeletePtrAt (size_t pos)
 
void DeletePtr (const TUse &tag, bool sortkey, bool del, size_t min=0, size_t max=0)
 
void DeletePtr (const TUse &tag, bool sortkey, size_t min=0, size_t max=0)
 
void DeletePtr (const TUse &tag, size_t min=0, size_t max=0)
 
void Inter (const iRContainer< C > &src1, const iRContainer< C > &src2)
 
void Union (const iRContainer< C > &src1, const iRContainer< C > &src2)
 
virtual ~iRContainer (void)
 
void Create (const iRContainer< C > &src)
 
iRContainerNormalCopy (const iRContainer< C > &src)
 
void DeepCopy (const iRContainer< C > &src)
 
iRContainerAdd (const iRContainer< C > &src)
 
- Static Private Member Functions inherited from RContainer< GDocFragmentRank, true, true >
static int SortOrder (const void *a, const void *b)
 
- Static Private Member Functions inherited from iRContainer< C >
static int SortOrder (const void *a, const void *b)
 

Detailed Description

Document Fragments Rankings.

The GDocFragmentRanks class provides a list of ranking for a given document fragment. Each ranking is identified by an information.

Constructor & Destructor Documentation

Constructor.

Parameters
fragmentDocument fragment.

Member Function Documentation

int Compare ( const GDocFragmentRanks fragment) const

Method to compare document fragments.

Parameters
fragmentDocument fragment.
int Compare ( const GDocFragment fragment) const

Method to compare document fragments.

Parameters
fragmentDocument fragment.
GDocFragment* GetFragment ( void  ) const

Get the document fragment.

Returns
a pointer to a GDocFragment.
GDocFragmentRank* AddRanking ( double  ranking,
const R::RString  info 
)

Add new ranking for the current document fragment and a given information. If a ranking with the same information already exists, it is replaced with the ranking.

Parameters
rankingRanking
engineEngine
Returns
the ranking (replaced or created).
R::RCursor<GDocFragmentRank> GetRankings ( void  ) const
Returns
a cursor on the rankings of the document fragment.
double GetRanking ( void  )
Returns
the global ranking of the document fragment.
void SetRanking ( double  ranking)

Set the global ranking for the document fragment.

Parameters
rankingRanking.
static int SortOrderRanking ( const void *  a,
const void *  b 
)
static

Static function used to order the ranking (the highest first). This function can be used with the RContainer::ReOrder method.

Parameters
aPointer to the first object.
bPointer to the second object.

Member Data Documentation

GDocFragment* Fragment
private

Document Fragment.

double Ranking
private

Global ranking of the fragment.