示例#1
0
/** Create sorted view, with some properties sorted in reverse
 *
 * The result is virtual, it merely maintains a permutation to access the
 * underlying view.  This "derived" view uses change notification to track
 * changes to the underlying view, but unfortunately there are some major
 * limitations with this scheme - one of them being that deriving another
 * view from this sorted one will not properly track changes.
 */
c4_View c4_View::SortOnReverse(const c4_View &up_,  
  ///< the view which defines the sort order
const c4_View &down_  ///< subset of up_, defines reverse order
)const {
  c4_Sequence *seq = f4_CreateProject(*_seq,  *up_._seq, true);

  return f4_CreateSort(*seq, down_._seq);
}
示例#2
0
/** Create derived view with some properties omitted
 *
 * The result is virtual, it merely maintains a permutation to access the
 * underlying view.  This "derived" view uses change notification to track
 * changes to the underlying view, but this only works when based on views
 * which properly generate change notifications (.e. raw views, selections,
 * and other projections).
 */
c4_View c4_View::ProjectWithout(const c4_View& out_) const
{
  return f4_CreateProject(*_seq, *_seq, false, out_._seq);
}
示例#3
0
/** Create view with the specified property arrangement
 *
 * The result is virtual, it merely maintains a permutation to access the
 * underlying view.  This "derived" view uses change notification to track
 * changes to the underlying view, but this only works when based on views
 * which properly generate change notifications (.e. raw views, selections,
 * and other projections).
 */
c4_View c4_View::Project(const c4_View& in_) const
{
  return f4_CreateProject(*_seq, *in_._seq, false);
}
示例#4
0
/** Create view sorted according to the specified properties
 *
 * The result is virtual, it merely maintains a permutation to access the
 * underlying view.  This "derived" view uses change notification to track
 * changes to the underlying view, but unfortunately there are some major
 * limitations with this scheme - one of them being that deriving another
 * view from this sorted one will not properly track changes.
 */
c4_View c4_View::SortOn(const c4_View& up_) const
{
  c4_Sequence* seq = f4_CreateProject(*_seq, *up_._seq, true);

  return f4_CreateSort(*seq);
}