263 m_adapter( adapter ), m_date(
date )
269 if ( m_date == iter.m_date &&
270 m_adapter.m_ts == iter.m_adapter.m_ts )
278 return !( *
this == iter );
289 date_int_type tmp = m_date;
296 if ( m_adapter.m_ts == NULL )
297 throw std::runtime_error(
"No time_series set for time_scale_adapter!" );
299 return m_adapter.m_aggregator( m_adapter.m_target_cal.get_date_period( m_date ), *m_adapter.m_ts ).clone();
304 if ( m_adapter.m_ts == NULL )
305 throw std::runtime_error(
"No time_series set for time_scale_adapter!" );
307 return & m_adapter.m_aggregator( m_adapter.m_target_cal.get_date_period( m_date ), *m_adapter.m_ts );
312 return m_adapter.get_calendar()( m_date );
323 date_int_type m_date;
327 m_ts( &ts ), m_target_cal( target_cal ), m_aggregator( ignore_missing )
329 m_begin = m_target_cal( m_ts->get_first_date() );
330 m_end = m_target_cal( m_ts->get_last_date() ) + 1;
333 m_ts( NULL ), m_target_cal( target_cal ), m_aggregator( ignore_missing )
338 time_scale_adapter_impl( ) :
339 m_ts( NULL ), m_target_cal ( business_calendar::Instance() ),
340 m_aggregator( ignore_missing )
348 return iterator( *
this, m_begin );
353 return iterator( *
this, m_end );
356 set_calendar( calendar &cal )
361 get_calendar( )
const
366 set_first_date( date d )
368 m_begin = m_target_cal( d );
371 get_first_date_int()
const
376 get_first_date()
const
378 return m_target_cal( m_begin );
381 set_last_date( date d )
383 m_end = m_target_cal( d );
386 get_last_date_int()
const
391 get_last_date()
const
393 return m_target_cal( m_end );
399 m_begin = m_target_cal( m_ts->get_first_date() );
400 m_end = m_target_cal( m_ts->get_last_date() ) + 1;
403 get_time_series( )
const
406 throw std::runtime_error(
"No time_series set for time_scale_adapter!" );
413 calendar & m_target_cal;
414 aggregator_type m_aggregator;
416 date_int_type m_begin;