SimGrid  3.18
Versatile Simulation of Distributed Systems
simgrid::s4u::Storage Class Reference

Detailed Description

#include <Storage.hpp>

Inheritance diagram for simgrid::s4u::Storage:
simgrid::xbt::Extendable< Storage >

Public Member Functions

 Storage (surf::StorageImpl *pimpl)
 
virtual ~Storage ()=default
 
std::string const & getName () const
 Retrieves the name of that storage as a C++ string. More...
 
const char * getCname () const
 Retrieves the name of that storage as a C string. More...
 
const char * getType ()
 
HostgetHost ()
 
std::map< std::string, std::string > * getProperties ()
 
const char * getProperty (std::string key)
 
void setProperty (std::string, std::string value)
 
void setUserdata (void *data)
 
voidgetUserdata ()
 
sg_size_t read (sg_size_t size)
 
sg_size_t write (sg_size_t size)
 
surf::StorageImplgetImpl ()
 
- Public Member Functions inherited from simgrid::xbt::Extendable< Storage >
 Extendable ()
 
 ~Extendable ()
 
voidextension (std::size_t rank)
 
U * extension (Extension< Storage, U > rank)
 
U * extension ()
 
void extension_set (std::size_t rank, void *value, bool use_dtor=true)
 
void extension_set (Extension< Storage, U > rank, U *value, bool use_dtor=true)
 
void extension_set (U *p)
 

Static Public Member Functions

static StoragebyName (std::string name)
 Retrieve a Storage by its name. More...
 
- Static Public Member Functions inherited from simgrid::xbt::Extendable< Storage >
static size_t extension_create (void(*deleter)(void *))
 
static Extension< Storage, U > extension_create (void(*deleter)(void *))
 
static Extension< Storage, U > extension_create ()
 

Public Attributes

Hostattached_to_ = nullptr
 

Static Public Attributes

static simgrid::xbt::signal< void(s4u::Storage &)> onCreation
 Callback signal fired when a new Link is created. More...
 
static simgrid::xbt::signal< void(s4u::Storage &)> onDestruction
 Callback signal fired when a Link is destroyed. More...
 

Constructor & Destructor Documentation

◆ Storage()

simgrid::s4u::Storage::Storage ( surf::StorageImpl pimpl)
inlineexplicit

◆ ~Storage()

virtual simgrid::s4u::Storage::~Storage ( )
virtualdefault

Member Function Documentation

◆ byName()

Storage * simgrid::s4u::Storage::byName ( std::string  name)
static

Retrieve a Storage by its name.

It must exist in the platform file

Examples:
examples/s4u/io-file-system/s4u-io-file-system.cpp, and examples/s4u/io-storage-raw/s4u-io-storage-raw.cpp.

◆ getName()

const std::string & simgrid::s4u::Storage::getName ( ) const

Retrieves the name of that storage as a C++ string.

◆ getCname()

const char * simgrid::s4u::Storage::getCname ( ) const

Retrieves the name of that storage as a C string.

Examples:
examples/s4u/io-file-system/s4u-io-file-system.cpp.

◆ getType()

const char * simgrid::s4u::Storage::getType ( )

◆ getHost()

Host * simgrid::s4u::Storage::getHost ( )

◆ getProperties()

std::map< std::string, std::string > * simgrid::s4u::Storage::getProperties ( )

◆ getProperty()

const char * simgrid::s4u::Storage::getProperty ( std::string  key)

◆ setProperty()

void simgrid::s4u::Storage::setProperty ( std::string  key,
std::string  value 
)

◆ setUserdata()

void simgrid::s4u::Storage::setUserdata ( void data)
inline

◆ getUserdata()

void* simgrid::s4u::Storage::getUserdata ( )
inline

◆ read()

sg_size_t simgrid::s4u::Storage::read ( sg_size_t  size)

◆ write()

sg_size_t simgrid::s4u::Storage::write ( sg_size_t  size)

◆ getImpl()

surf::StorageImpl* simgrid::s4u::Storage::getImpl ( )
inline

Member Data Documentation

◆ onCreation

simgrid::xbt::signal< void(s4u::Storage &)> simgrid::s4u::Storage::onCreation
static

Callback signal fired when a new Link is created.

◆ onDestruction

simgrid::xbt::signal< void(s4u::Storage &)> simgrid::s4u::Storage::onDestruction
static

Callback signal fired when a Link is destroyed.

◆ attached_to_

Host* simgrid::s4u::Storage::attached_to_ = nullptr

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