12#include <unordered_map>
41 void rename(std::string value);
52 void setType(std::string value);
116 [[nodiscard]]
bool hasAdjustment(
const std::string& key)
const;
128 [[nodiscard]]
bool hasType() const noexcept;
138 [[nodiscard]]
bool hasConfig() const noexcept;
163 [[nodiscard]]
bool isTabular() const noexcept;
202 std::
string configJson_;
203 std::
string filterSpec_;
204 std::
string exportFormat_;
205 bool includeCalculationAdjustments_ = true;
206 std::
string exportStateJson_;
207 std::
string snapshotTransactionsJson_;
208 std::unordered_map<std::
string,
double> adjustments_;
209 std::
string createdAt_;
210 std::
string updatedAt_;
214 [[nodiscard]] const std::
string&
id() const noexcept;
215 [[nodiscard]] const std::
string&
name() const noexcept;
216 [[nodiscard]] const std::
string&
type() const noexcept;
217 [[nodiscard]] const std::
string&
configJson() const noexcept;
218 [[nodiscard]] const std::
string&
filterSpec() const noexcept;
219 [[nodiscard]] const std::
string&
exportFormat() const noexcept;
223 [[nodiscard]] const std::unordered_map<std::
string,
double>&
adjustments() const noexcept;
224 [[nodiscard]] const std::
string&
createdAt() const noexcept;
225 [[nodiscard]] const std::
string&
updatedAt() const noexcept;
228 void setId(std::
string value);
Shared analysis validation and normalization helpers.
Value object for analysis type labels.
Small value object for normalized entity display names.
Value object for analysis filter specifications.
bool isResultReady() const noexcept
Checks whether the analysis has enough data to represent a result.
std::string outputType() const
Resolves the effective output type for the analysis.
bool isChartLike() const noexcept
Checks whether the analysis type is chart-like.
bool isTabular() const noexcept
Checks whether the analysis type is tabular.
Analysis & operator=(const Analysis &)=delete
void rename(EntityName value)
Renames the analysis with normalized entity text.
bool hasType() const noexcept
Checks whether the analysis has a valid type.
const std::string & filterSpec() const noexcept
void setAdjustment(std::string key, double value)
Sets or updates a normalized adjustment entry.
Analysis(const Analysis &)=delete
void setCreatedAt(std::string value)
const std::string & createdAt() const noexcept
void setExportStateJson(std::string value)
Stores the export state JSON snapshot.
void setType(AnalysisType value)
Sets the analysis type from a value object.
void removeAdjustment(const std::string &key)
Removes a normalized adjustment entry.
const std::string & configJson() const noexcept
const std::string & snapshotTransactionsJson() const noexcept
std::size_t adjustmentCount() const noexcept
Returns the number of adjustments.
const std::string & name() const noexcept
const std::string & exportFormat() const noexcept
bool isReadyForExport() const noexcept
Checks whether the analysis is ready to export.
bool hasSnapshotTransactions() const noexcept
Checks whether snapshot transactions are present.
bool hasFilterSpec() const noexcept
Checks whether a filter specification exists.
void setUpdatedAt(std::string value)
const std::string & exportStateJson() const noexcept
bool hasConfig() const noexcept
Checks whether configuration JSON exists.
bool hasAdjustment(const std::string &key) const
Checks whether an adjustment exists.
void setSnapshotTransactionsJson(std::string value)
Stores the snapshot transactions JSON.
void setId(std::string value)
Analysis(Analysis &&)=delete
void setExportFormat(ExportFormat value)
Sets the export format from a value object.
std::string executionType() const
Resolves the effective execution type for the analysis.
const bool & includeCalculationAdjustments() const noexcept
void setFilterSpec(FilterSpec value)
Sets the filter specification from a value object.
void setConfigJson(std::string value)
Stores the raw configuration JSON.
const std::unordered_map< std::string, double > & adjustments() const noexcept
void clearAdjustments()
Clears all adjustment entries.
const std::string & updatedAt() const noexcept
bool isConfigured() const noexcept
Checks whether the analysis is configured sufficiently for processing.
const std::string & type() const noexcept
Analysis & operator=(Analysis &&)=delete
void setIncludeCalculationAdjustments(bool value)
Enables or disables calculation adjustments.
bool hasExportFormat() const noexcept
Checks whether the analysis has a valid export format.
bool supportsExportFormat(const std::string &candidate) const
Checks whether a candidate export format matches this analysis.
bool hasAdjustments() const noexcept
Checks whether at least one adjustment exists.