Builder Source

Implementation of the Builder Pattern.

This file contains the implementation details of the Product, ConcreteBuilder, and Director classes, following the Builder Pattern to construct complex objects.

namespace builder_pattern

Overloads the output stream operator for the Product class.

Namespace for the Builder pattern.

Allows the details of the Product to be printed to an output stream.

Param os:

The output stream to write to.

Param product:

The product whose details are printed.

Return:

The output stream with appended product details.

Functions

std::ostream &operator<<(std::ostream &os, const Product &product)

Allows the details of the Product to be printed to an output stream.

Parameters:
  • os – The output stream.

  • product – The product to be printed.

Returns:

The output stream with product details appended.

Inner Namespaces