casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Private Attributes | List of all members
casatools::State Class Reference

namespace for CASAtools classes within "CASA code" More...

#include <State.h>

Inheritance diagram for casatools::State:
casacore::AppState

Public Member Functions

 State ()
 
virtual bool initialized () const
 
virtual std::list< std::string > dataPath () const
 get the list of directories in the data path... More...
 
void clearDataPath ()
 
void setDataPath (const std::vector< std::string > &new_list)
 
std::list< ServiceIdservices ()
 get map of registrations More...
 
bool removeService (std::string id)
 returns true if a registration for 'id' was found More...
 
ServiceId addService (std::string proposed_id, std::string uri, const std::list< std::string > &types)
 returns assigned identifier (likely based upon the proposed_id) More...
 
ServiceId addService (const ServiceId &new_service)
 
std::string registryURI ()
 
void shutdown ()
 do any necessary shutdown functions, More...
 
- Public Member Functions inherited from casacore::AppState
virtual std::string resolve (const std::string &filename) const
 use the data path to find the filename... More...
 
virtual ~AppState ()
 

Private Attributes

std::mutex data_path_mutex
 
std::list< std::string > data_path
 
Registrar registrar
 

Detailed Description

namespace for CASAtools classes within "CASA code"

Definition at line 42 of file State.h.

Constructor & Destructor Documentation

casatools::State::State ( )
inline

Definition at line 45 of file State.h.

Member Function Documentation

ServiceId casatools::State::addService ( std::string  proposed_id,
std::string  uri,
const std::list< std::string > &  types 
)
inline

returns assigned identifier (likely based upon the proposed_id)

Definition at line 91 of file State.h.

References casatools::Registrar::add(), and registrar.

ServiceId casatools::State::addService ( const ServiceId new_service)
inline

Definition at line 94 of file State.h.

References casatools::Registrar::add(), and registrar.

void casatools::State::clearDataPath ( )
inline

protect critical section...

Definition at line 53 of file State.h.

References data_path, and data_path_mutex.

virtual std::list<std::string> casatools::State::dataPath ( ) const
inlinevirtual

get the list of directories in the data path...

Reimplemented from casacore::AppState.

Definition at line 49 of file State.h.

References data_path.

virtual bool casatools::State::initialized ( ) const
inlinevirtual

Reimplemented from casacore::AppState.

Definition at line 47 of file State.h.

std::string casatools::State::registryURI ( )
inline

Definition at line 99 of file State.h.

References registrar, and casatools::Registrar::uri().

bool casatools::State::removeService ( std::string  id)
inline

returns true if a registration for 'id' was found

Definition at line 89 of file State.h.

References registrar, and casatools::Registrar::remove().

std::list<ServiceId> casatools::State::services ( )
inline

get map of registrations

Definition at line 87 of file State.h.

References registrar, and casatools::Registrar::services().

void casatools::State::setDataPath ( const std::vector< std::string > &  new_list)
inline

accept only strings that are the path to a directory

protect critical section...

always clear the existing path

convert the paths to fully qualified paths

Definition at line 59 of file State.h.

References data_path, data_path_mutex, free(), and casa::utilj::transform().

void casatools::State::shutdown ( )

do any necessary shutdown functions,

Member Data Documentation

std::list<std::string> casatools::State::data_path
private

Definition at line 108 of file State.h.

Referenced by clearDataPath(), dataPath(), and setDataPath().

std::mutex casatools::State::data_path_mutex
private

Definition at line 107 of file State.h.

Referenced by clearDataPath(), and setDataPath().

Registrar casatools::State::registrar
private

Definition at line 109 of file State.h.

Referenced by addService(), registryURI(), removeService(), and services().


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