WSF
usmtf::Segment Class Reference

#include <Segment.hpp>

Public Types

using SetPosition = size_t
 Location in file, useful for logging errors.
using SetLocation = std::pair<const Set&, SetPosition>
using SetLocations = std::vector<SetLocation>

Public Member Functions

 Segment (const SetLocations &aSets) noexcept
const SetLocation GetSet (const std::string &aSTF) const
const SetGetSet (SetPosition aSetIndex) const
std::vector< SetLocationsGetSubSegments (const std::string &aSTF) const
SetLocations GetSubSegment (const SetPosition &startPosition, const SetPosition &stopPosition) const
SetLocations GetSets (const std::string &aSTF) const noexcept
size_t GetNumberOfSets () const noexcept
bool HasSet (const std::string &aSTF) const
SetLocations::const_iterator begin () const
 Iteration support.
SetLocations::const_iterator end () const

Detailed Description

A segment is an extracted aggregation of Sets from a message, usually indicating some logical idea. Transforms will take segments and create script blocks out of them The reason they are their own class is for some convenience while working with them. They are similar to a Message in that they are a collection of sets with some similar convenience methods, however they are distinct in that they are just an arbitrary collection of sets, not a USMTF governed collection. Simply think of them as an excerpt from a Message. Segment is actual USMTF Parlance or id have called this message excerpt. Segments are the paragraph of the USMTF if you will.

Member Typedef Documentation

◆ SetLocation

using usmtf::Segment::SetLocation = std::pair<const Set&, SetPosition>

◆ SetLocations

◆ SetPosition

Location in file, useful for logging errors.

Constructor & Destructor Documentation

◆ Segment()

usmtf::Segment::Segment ( const SetLocations & aSets)
explicitnoexcept

Member Function Documentation

◆ begin()

Segment::SetLocations::const_iterator usmtf::Segment::begin ( ) const

Iteration support.

◆ end()

Segment::SetLocations::const_iterator usmtf::Segment::end ( ) const

◆ GetNumberOfSets()

size_t usmtf::Segment::GetNumberOfSets ( ) const
noexcept

Referenced by GetSubSegments().

◆ GetSet() [1/2]

const Segment::SetLocation usmtf::Segment::GetSet ( const std::string & aSTF) const

Referenced by GetSubSegment().

◆ GetSet() [2/2]

const Set & usmtf::Segment::GetSet ( Segment::SetPosition aSetIndex) const

◆ GetSets()

Segment::SetLocations usmtf::Segment::GetSets ( const std::string & aSTF) const
noexcept

Referenced by GetSubSegments().

◆ GetSubSegment()

Segment::SetLocations usmtf::Segment::GetSubSegment ( const SetPosition & startPosition,
const SetPosition & stopPosition ) const

References GetSet().

Referenced by GetSubSegments().

◆ GetSubSegments()

std::vector< Segment::SetLocations > usmtf::Segment::GetSubSegments ( const std::string & aSTF) const

◆ HasSet()

bool usmtf::Segment::HasSet ( const std::string & aSTF) const

The documentation for this class was generated from the following files:
Copyrights Multiple, All Rights Reserved