14 #ifndef _DataSourceController_H_ 15 #define _DataSourceController_H_ 20 #include <msdevstudio/MSconfig.h> 21 #pragma warning(disable:4290) // advice from MSDN article and others 68 mutable std:: vector < std::string >
m_names;
95 void willDelete (
const Observable * observee );
102 int indexOfDataSource (
const std::string & name )
const;
111 DataSource * findDataSource (
const std::string & name )
112 const throw ( std::runtime_error );
121 DataSource * getDataSource (
const std::string & name )
const;
127 void changeName (
const std::string & old_name,
128 const std::string & new_name );
137 void getDataSources ( std::vector < DataSource * > &,
138 bool all =
true )
const;
145 const std::vector < std::string > & getNTupleNames ()
const;
149 void registerDataSourceFile (
DataSource * ds );
155 std::string registerNTuple (
DataSource * nt );
162 void registerNTuple (
const std::string &,
DataSource * source );
168 void unregisterNTuple (
const DataSource * nt );
173 bool isFromFile (
const DataSource * source )
const;
181 void setCurrentIndex (
int index );
187 #endif // _DataSourceController_H_ Part of an implementation of the Observable-Observer pattern based on the example in the GOF Patterns...
int m_suffix
Suffix added to base name given to NTuple which is built in memory.
std::string m_base_name
Base of name given to NTuple which is built in memory.
std::vector< DataSource * > DataSourceList_t
The type of STL container used to keep list of DataSource objects.
std::vector< std::string > m_names
A temporary list of DataSource names.
DataSourceList_t m_sources
The list of registered DataSource objects.
static DataSourceController * s_instance
The pointer to the singleton object.
#define MDL_HIPPOPLOT_API
DataSourceList_t m_ds_files
The list of files that were read.
A singleton class that is the interface between GUI and the DataSource objects.
Part of an implementation of the Observable Observer pattern based on the example implementation in t...
Observer class interface.
int m_current_index
The current DataSource index.
Base class for DataSource.