helics  3.5.2
Public Member Functions | List of all members
helics::data_view Class Reference

#include <data_view.hpp>

Public Member Functions

 data_view ()=default
 
 ~data_view ()=default
 
 data_view (std::shared_ptr< const SmallBuffer > dt)
 
 data_view (const SmallBuffer &dt) noexcept
 
 data_view (const data_view &dt) noexcept=default
 
 data_view (data_view &&dv) noexcept
 
template<typename U , typename T = std::enable_if_t<std::is_constructible_v<std::string_view, U>>>
 data_view (U &&u) noexcept
 
 data_view (const char *dt, size_t len) noexcept
 
 data_view (SmallBuffer &&sb)
 
 data_view (const std::vector< char > &dvec) noexcept
 
 data_view (const std::vector< double > &dvec) noexcept
 
data_viewoperator= (const data_view &dv) noexcept=default
 
data_viewoperator= (data_view &&dv) noexcept
 
data_viewoperator= (std::shared_ptr< const SmallBuffer > dt) noexcept
 
data_viewoperator= (const SmallBuffer &dt) noexcept
 
data_viewoperator= (const std::string_view &str) noexcept
 
data_viewoperator= (const char *s) noexcept
 
SmallBuffer to_buffer () const
 
void swap (data_view &dv2) noexcept
 
const char * data () const noexcept
 
const std::byte * bytes () const noexcept
 
size_t size () const noexcept
 
bool empty () const noexcept
 
std::string string () const
 
std::string_view string_view () const
 
char operator[] (int index) const
 
auto begin ()
 
auto end ()
 
auto cbegin () const
 
auto cend () const
 

Detailed Description

class containing a constant view of data block

Constructor & Destructor Documentation

◆ data_view() [1/8]

helics::data_view::data_view ( )
default

default constructor

◆ ~data_view()

helics::data_view::~data_view ( )
default

destructor

◆ data_view() [2/8]

helics::data_view::data_view ( std::shared_ptr< const SmallBuffer dt)
inline

construct from a shared_ptr to a data_block

◆ data_view() [3/8]

helics::data_view::data_view ( const SmallBuffer dt)
inlinenoexcept

construct from a regular data_block

◆ data_view() [4/8]

helics::data_view::data_view ( const data_view dt)
defaultnoexcept

copy constructor

◆ data_view() [5/8]

helics::data_view::data_view ( data_view &&  dv)
inlinenoexcept

move constructor

◆ data_view() [6/8]

helics::data_view::data_view ( const char *  dt,
size_t  len 
)
inlinenoexcept

construct from a char Pointer and length

◆ data_view() [7/8]

helics::data_view::data_view ( SmallBuffer &&  sb)
inline

construct from a rValue to a string

◆ data_view() [8/8]

helics::data_view::data_view ( const std::vector< char > &  dvec)
inlinenoexcept

construct from a char vector

Member Function Documentation

◆ begin()

auto helics::data_view::begin ( )
inline

begin iterator

◆ bytes()

const std::byte* helics::data_view::bytes ( ) const
inlinenoexcept

get the data as a std::byte array

Referenced by helics::ValueConverter< X >::interpret().

◆ cbegin()

auto helics::data_view::cbegin ( ) const
inline

begin const iterator

◆ cend()

auto helics::data_view::cend ( ) const
inline

end const iterator

◆ data()

const char* helics::data_view::data ( ) const
inlinenoexcept

◆ empty()

bool helics::data_view::empty ( ) const
inlinenoexcept

check if the view is empty

◆ end()

auto helics::data_view::end ( )
inline

end iterator

◆ operator=() [1/5]

data_view& helics::data_view::operator= ( const char *  s)
inlinenoexcept

assignment from a const char *

◆ operator=() [2/5]

data_view& helics::data_view::operator= ( const data_view dv)
defaultnoexcept

assignment operator from another ata_view

◆ operator=() [3/5]

data_view& helics::data_view::operator= ( const SmallBuffer dt)
inlinenoexcept

assignment from a data_block

◆ operator=() [4/5]

data_view& helics::data_view::operator= ( const std::string_view &  str)
inlinenoexcept

assignment from a string_view

◆ operator=() [5/5]

data_view& helics::data_view::operator= ( std::shared_ptr< const SmallBuffer dt)
inlinenoexcept

assignment from a data_block shared_ptr

◆ operator[]()

char helics::data_view::operator[] ( int  index) const
inline

random access operator

◆ size()

size_t helics::data_view::size ( ) const
inlinenoexcept

◆ string()

std::string helics::data_view::string ( ) const
inline

return a string of the data

this actually does a copy to a new string

◆ string_view()

std::string_view helics::data_view::string_view ( ) const
inline

get a string_view object

Referenced by helicsInputGetDataBuffer().

◆ swap()

void helics::data_view::swap ( data_view dv2)
inlinenoexcept

swap function

References swap().

Referenced by swap().

◆ to_buffer()

SmallBuffer helics::data_view::to_buffer ( ) const
inline

create a new data_block from the data


The documentation for this class was generated from the following file: