yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
yaze::core::ProjectPlan Class Reference

#include <project_plan.h>

Collaboration diagram for yaze::core::ProjectPlan:

Public Member Functions

std::string Serialize () const
 
absl::Status SaveToFile (const std::string &path) const
 
absl::Status SaveToFile (const std::string &path, const std::string &expected_source) const
 
absl::Status ValidateIds () const
 
std::string NewMilestoneId () const
 
std::string NewStepId () const
 
std::string NewItemId () const
 
std::string NewDecisionId () const
 
absl::Status RenameStep (std::string_view id, std::string new_id)
 
absl::Status RenameItem (std::string_view id, std::string new_id)
 
int FindStep (std::string_view id) const
 
std::vector< const PlanRouteItem * > ItemsAtStep (std::string_view step) const
 
std::vector< const PlanDecision * > OpenDecisions () const
 
const PlanMilestone * CurrentMilestone (std::string_view today) const
 

Static Public Member Functions

static ProjectPlan CreateEmpty (std::string title)
 
static absl::StatusOr< ProjectPlan > Parse (std::string_view text)
 
static absl::StatusOr< ProjectPlan > LoadFromFile (const std::string &path, std::string *source=nullptr)
 
static absl::Status CreateAndLink (project::YazeProject *project, const std::string &path)
 
static absl::Status PublishSource (const std::string &path, const std::string &expected_source, const std::string &text)
 

Public Attributes

std::string title
 
std::string about
 
PlanGoal goal
 
std::vector< PlanMilestone > milestones
 
std::vector< PlanRouteStep > route_steps
 
std::vector< PlanRouteItem > route_items
 
PlanJson route_extra = PlanJson::object()
 
std::vector< PlanDecision > decisions
 
std::vector< PlanReference > references
 
PlanJson extra = PlanJson::object()
 

Detailed Description

Definition at line 110 of file project_plan.h.

Member Function Documentation

◆ CreateEmpty()

ProjectPlan yaze::core::ProjectPlan::CreateEmpty ( std::string title)
static

Definition at line 440 of file project_plan.cc.

References title.

Referenced by CreateAndLink().

◆ Parse()

absl::StatusOr< ProjectPlan > yaze::core::ProjectPlan::Parse ( std::string_view text)
static

◆ LoadFromFile()

absl::StatusOr< ProjectPlan > yaze::core::ProjectPlan::LoadFromFile ( const std::string & path,
std::string * source = nullptr )
static

◆ CreateAndLink()

◆ Serialize()

◆ SaveToFile() [1/2]

absl::Status yaze::core::ProjectPlan::SaveToFile ( const std::string & path) const

Definition at line 662 of file project_plan.cc.

References RETURN_IF_ERROR, Serialize(), ValidateIds(), and yaze::project::WriteProjectFileAtomically().

Here is the call graph for this function:

◆ SaveToFile() [2/2]

absl::Status yaze::core::ProjectPlan::SaveToFile ( const std::string & path,
const std::string & expected_source ) const

Definition at line 667 of file project_plan.cc.

References PublishSource(), RETURN_IF_ERROR, Serialize(), and ValidateIds().

Here is the call graph for this function:

◆ PublishSource()

absl::Status yaze::core::ProjectPlan::PublishSource ( const std::string & path,
const std::string & expected_source,
const std::string & text )
static

◆ ValidateIds()

absl::Status yaze::core::ProjectPlan::ValidateIds ( ) const

◆ NewMilestoneId()

std::string yaze::core::ProjectPlan::NewMilestoneId ( ) const

Definition at line 699 of file project_plan.cc.

References milestones.

◆ NewStepId()

std::string yaze::core::ProjectPlan::NewStepId ( ) const

Definition at line 703 of file project_plan.cc.

References decisions, yaze::core::PlanTarget::Parse(), route_items, and route_steps.

Here is the call graph for this function:

◆ NewItemId()

std::string yaze::core::ProjectPlan::NewItemId ( ) const

Definition at line 730 of file project_plan.cc.

References decisions, yaze::core::PlanTarget::Parse(), route_items, and route_steps.

Here is the call graph for this function:

◆ NewDecisionId()

std::string yaze::core::ProjectPlan::NewDecisionId ( ) const

Definition at line 751 of file project_plan.cc.

References decisions, yaze::core::PlanTarget::Parse(), and route_steps.

Here is the call graph for this function:

◆ RenameStep()

absl::Status yaze::core::ProjectPlan::RenameStep ( std::string_view id,
std::string new_id )

Definition at line 772 of file project_plan.cc.

References decisions, FindStep(), yaze::core::RenamePlanAgentObservation(), RETURN_IF_ERROR, route_items, route_steps, and ValidateIds().

Here is the call graph for this function:

◆ RenameItem()

absl::Status yaze::core::ProjectPlan::RenameItem ( std::string_view id,
std::string new_id )

Definition at line 807 of file project_plan.cc.

References decisions, yaze::core::RenamePlanAgentObservation(), RETURN_IF_ERROR, route_items, route_steps, and ValidateIds().

Here is the call graph for this function:

◆ FindStep()

int yaze::core::ProjectPlan::FindStep ( std::string_view id) const

Definition at line 835 of file project_plan.cc.

References route_steps.

Referenced by RenameStep().

◆ ItemsAtStep()

std::vector< const PlanRouteItem * > yaze::core::ProjectPlan::ItemsAtStep ( std::string_view step) const

Definition at line 844 of file project_plan.cc.

References route_items.

◆ OpenDecisions()

std::vector< const PlanDecision * > yaze::core::ProjectPlan::OpenDecisions ( ) const

Definition at line 855 of file project_plan.cc.

References decisions.

◆ CurrentMilestone()

const PlanMilestone * yaze::core::ProjectPlan::CurrentMilestone ( std::string_view today) const

Definition at line 871 of file project_plan.cc.

References milestones.

Member Data Documentation

◆ title

std::string yaze::core::ProjectPlan::title

◆ about

std::string yaze::core::ProjectPlan::about

Definition at line 153 of file project_plan.h.

Referenced by Parse(), and Serialize().

◆ goal

PlanGoal yaze::core::ProjectPlan::goal

Definition at line 154 of file project_plan.h.

Referenced by Parse(), and Serialize().

◆ milestones

◆ route_steps

◆ route_items

◆ route_extra

PlanJson yaze::core::ProjectPlan::route_extra = PlanJson::object()

◆ decisions

◆ references

std::vector<PlanReference> yaze::core::ProjectPlan::references

Definition at line 160 of file project_plan.h.

Referenced by Parse(), and Serialize().

◆ extra


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