Adaptyst
A comprehensive and architecture-agnostic performance analysis tool
Loading...
Searching...
No Matches
adaptyst::Array< T > Class Template Reference

#include <output.hpp>

Inheritance diagram for adaptyst::Array< T >:
adaptyst::File adaptyst::ObjectWithMetadata

Public Member Functions

 Array (Path &path, std::string name)
 
operator[] (int index)
 
int size ()
 
void push_back (T val)
 
- Public Member Functions inherited from adaptyst::File
 File (Path &path, std::string name, std::string extension="", bool truncate=true)
 
Fileoperator= (File &&source)
 
std::ifstream & get_istream ()
 
std::ofstream & get_ostream ()
 
void save_metadata ()
 

Additional Inherited Members

- Protected Attributes inherited from adaptyst::File
Pathpath
 
std::string name
 
std::ifstream istream
 
std::ofstream ostream
 

Detailed Description

template<class T>
class adaptyst::Array< T >

This class represents an array of arbitrary values saved to a file and with metadata attached to it (thanks to inheriting from File which inherits from ObjectWithMetadata) and saved separately.

Constructor & Destructor Documentation

◆ Array()

template<class T>
adaptyst::Array< T >::Array ( Path & path,
std::string name )
inline

Constructs an Array object.

Parameters
pathPath to a directory where the array is.
nameName of the array.

Member Function Documentation

◆ operator[]()

template<class T>
T adaptyst::Array< T >::operator[] ( int index)
inline

Accesses the index-th element of the array.

Parameters
indexArray index to access.
Returns
index-th element of the array.

◆ push_back()

template<class T>
void adaptyst::Array< T >::push_back ( T val)
inline

Pushes a new element to the end of the array and saves the new array to disk.

Parameters
valValue to push.

◆ size()

template<class T>
int adaptyst::Array< T >::size ( )
inline

Gets the current array size.

Returns
Array size.

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