Xport Interface: stylesheet::erase

Erases zero or more stylesheet items from the called stylesheet.

  stylesheet::iterator stylesheet::erase(1st Variety
  const stylesheet::const_iterator& pos
);
stylesheet::iterator stylesheet::erase(2nd Variety
  const stylesheet::const_iterator& beg_pos,
  const const_iterator& end_pos
);
stylesheet::iterator stylesheet::erase(3rd Variety
  const string& selector
);

Parameters

pos

A stylesheet iterator which points to the stylesheet item to be erased. User must insure the iterator position is valid.

beg_pos

A stylesheet iterator which points to the first stylesheet item in the range to be erased. User must insure the iterator position is valid.

end_pos

A stylesheet iterator which points just past the last stylesheet item in the range to be erased. User must insure the iterator position is valid.

selector

A string which specifies a selector for the rule to be erased.

Returns

In the first 2 varieties, a stylesheet iterator which points just past the erased stylesheet item, or range of erased items. In the 3rd variety, returns true if the rule was found and erased, false otherwise.

Remarks

This operation is used to remove stylesheet items from the called stylesheet. In the first variety, a single stylesheet item which is pointed to by the passed stylesheet iterator is erased. In the second variety, a range of items can be erased, determined by the passed stylesheet iterators. In the third variety, only a stylesheet rule can be erased, which is determined by the passed selector. This variety is handy for deleting a specific rule in the stylesheet, if you know the rule's selector.

Complexity

Logarithmic

Examples

Work Time Studio

Datasoft Solutions is proud to present their landmark product, Work Time Studio. Utilizing the tree container library, Work Time Studio provides unparalleled features in personal time, project and task management software. If you're looking for a way to increase your productivity, visit Work Time Studio's product website, and start being more productive today.