Alexandria  2.16
Please provide a description of the project.
Namespaces | Classes | Functions
Euclid Namespace Reference

Namespaces

 Configuration
 
 GridContainer
 
 Histogram
 
 MathUtils
 
 NdArray
 
 PhysicsUtils
 
 SOM
 
 SourceCatalog
 
 Table
 
 XYDataset
 

Classes

class  InstOrRefHolder
 
class  ThreadPool
 Basic thread pool implementation. More...
 

Functions

template<typename T , typename... Args>
std::unique_ptr< T > make_unique (Args &&... args)
 Constructs an object of type T and wraps it in a std::unique_ptr using args as the parameter list for the constructor of T. More...
 
template<typename T >
std::vector< T > stringToVector (std::string str, const std::string &separators=std::string(", "))
 

Detailed Description

Copyright (C) 2012-2020 Euclid Science Ground Segment

This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3.0 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA

Function Documentation

◆ make_unique()

template<typename T , typename... Args>
std::unique_ptr<T> Euclid::make_unique ( Args &&...  args)

Constructs an object of type T and wraps it in a std::unique_ptr using args as the parameter list for the constructor of T.

Parameters
argslist of arguments with which the instance of T will be constructed
Returns
std::unique_ptr of the instance of type T

Definition at line 41 of file memory_tools.h.

◆ stringToVector()

template<typename T >
std::vector<T> Euclid::stringToVector ( std::string  str,
const std::string separators = std::string(", ") 
)

Convert a string into a vector of any given type.

Template Parameters
TThe destination type. boost::lexical_cast<T> will be used internally.
Parameters
strThe original string.
separatorsList of characters to be used as separator. Defaults to the space and the comma.
Returns
A vector of type T.

Definition at line 44 of file StringUtils.h.

References std::vector< T >::begin(), std::string::begin(), e, std::vector< T >::end(), std::vector< T >::size(), split(), and std::transform().

Here is the call graph for this function: