OpenStudio:utilities
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Pages
Protected Attributes | List of all members
openstudio::SqlFileTimeSeriesQuery Class Reference

#include <SqlFileTimeSeriesQuery.hpp>

Public Member Functions

Constructors
 SqlFileTimeSeriesQuery (const boost::optional< openstudio::EnvironmentIdentifier > &oEnvId=boost::none, const boost::optional< openstudio::ReportingFrequency > &oRF=boost::none, const boost::optional< openstudio::TimeSeriesIdentifier > &oTsId=boost::none, const boost::optional< openstudio::KeyValueIdentifier > &oKvId=boost::none)
 Constructor from optionals. More...
 
 SqlFileTimeSeriesQuery (const EnvironmentIdentifier &envId)
 Constructor from EnvironmentIdentifier. More...
 
 SqlFileTimeSeriesQuery (const std::string &environmentPeriod, const openstudio::ReportingFrequency &reportingFrequency, const std::string &timeSeriesName, const std::string &keyValue)
 Construct from fully specified query. More...
 
Getters
boost::optional
< openstudio::EnvironmentIdentifier
environment () const
 Get the EnvironmentIdentifier. More...
 
boost::optional
< openstudio::ReportingFrequency
reportingFrequency () const
 Get the ReportingFrequency. More...
 
boost::optional
< openstudio::TimeSeriesIdentifier
timeSeries () const
 Get the time series identifier. More...
 
boost::optional
< openstudio::KeyValueIdentifier
keyValues () const
 Get the key value identifier. More...
 
bool vetted () const
 Returns true if this query has been vetted (expended) by a SqlFile. More...
 
Setters
void setEnvironment (const EnvironmentIdentifier &envId)
 Set the EnvironmentIdentifier. More...
 
void setReportingFrequency (const openstudio::ReportingFrequency &rf)
 Set the ReportingFrequency. More...
 
void setTimeSeries (const TimeSeriesIdentifier &tsId)
 Set the TimeSeries NameIdentifier. More...
 
void setKeyValues (const KeyValueIdentifier &kvId)
 Set the KeyValues NameIdentifier. More...
 
void clearEnvironment ()
 Remove any EnvironmentIdentifier. More...
 
void clearReportingFrequency ()
 Remove any ReportingFrequency. More...
 
void clearTimeSeries ()
 Remove any TimeSeries. More...
 
void clearKeyValues ()
 Remove any KeyValues. More...
 

Protected Attributes

bool m_vetted
 

Detailed Description

Class to hold information about one or more SqlFile time series of interest.

The query is limited to one ReportingFrequency so that the resulting TimeSeries.values() Vectors are of the same length. This class is intended to serve as a way to streamline the SqlFile interface, and also as data storage for classes like analysis::SqlTimeSeriesVariableAccessor.

Constructor & Destructor Documentation

openstudio::SqlFileTimeSeriesQuery::SqlFileTimeSeriesQuery ( const boost::optional< openstudio::EnvironmentIdentifier > &  oEnvId = boost::none,
const boost::optional< openstudio::ReportingFrequency > &  oRF = boost::none,
const boost::optional< openstudio::TimeSeriesIdentifier > &  oTsId = boost::none,
const boost::optional< openstudio::KeyValueIdentifier > &  oKvId = boost::none 
)

Constructor from optionals.

Environment period, reporting frequency, time series, and key values can all be specified (or not).

openstudio::SqlFileTimeSeriesQuery::SqlFileTimeSeriesQuery ( const EnvironmentIdentifier envId)

Constructor from EnvironmentIdentifier.

openstudio::SqlFileTimeSeriesQuery::SqlFileTimeSeriesQuery ( const std::string &  environmentPeriod,
const openstudio::ReportingFrequency reportingFrequency,
const std::string &  timeSeriesName,
const std::string &  keyValue 
)

Construct from fully specified query.

Member Function Documentation

void openstudio::SqlFileTimeSeriesQuery::clearEnvironment ( )

Remove any EnvironmentIdentifier.

void openstudio::SqlFileTimeSeriesQuery::clearKeyValues ( )

Remove any KeyValues.

void openstudio::SqlFileTimeSeriesQuery::clearReportingFrequency ( )

Remove any ReportingFrequency.

void openstudio::SqlFileTimeSeriesQuery::clearTimeSeries ( )

Remove any TimeSeries.

boost::optional<openstudio::EnvironmentIdentifier> openstudio::SqlFileTimeSeriesQuery::environment ( ) const
boost::optional<openstudio::KeyValueIdentifier> openstudio::SqlFileTimeSeriesQuery::keyValues ( ) const

Get the key value identifier.

boost::optional<openstudio::ReportingFrequency> openstudio::SqlFileTimeSeriesQuery::reportingFrequency ( ) const
void openstudio::SqlFileTimeSeriesQuery::setEnvironment ( const EnvironmentIdentifier envId)
void openstudio::SqlFileTimeSeriesQuery::setKeyValues ( const KeyValueIdentifier kvId)

Set the KeyValues NameIdentifier.

void openstudio::SqlFileTimeSeriesQuery::setReportingFrequency ( const openstudio::ReportingFrequency rf)
void openstudio::SqlFileTimeSeriesQuery::setTimeSeries ( const TimeSeriesIdentifier tsId)

Set the TimeSeries NameIdentifier.

boost::optional<openstudio::TimeSeriesIdentifier> openstudio::SqlFileTimeSeriesQuery::timeSeries ( ) const

Get the time series identifier.

bool openstudio::SqlFileTimeSeriesQuery::vetted ( ) const

Returns true if this query has been vetted (expended) by a SqlFile.

Member Data Documentation

bool openstudio::SqlFileTimeSeriesQuery::m_vetted
protected