Orderbook Simulation
OrderbookSim is a C++ application simulating a financial market order book. It efficiently manages and matches buy and sell orders while calculating the Volume-Weighted Average Price (VWAP).
Enumerations | Functions
Side.hpp File Reference

Defines the Side enum for representing order sides (buy or sell) and utility functions. More...

#include <string>

Go to the source code of this file.

Enumerations

enum class  Side { Buy , Sell }
 Represents the side of an order in a trading system (either buy or sell). More...
 

Functions

std::string sideToString (Side side)
 Converts a Side value to its corresponding string representation. More...
 

Detailed Description

Defines the Side enum for representing order sides (buy or sell) and utility functions.

The Side enum is used to distinguish between buy and sell orders, and includes a utility function for converting the enum to a string representation.

Enumeration Type Documentation

◆ Side

enum Side
strong

Represents the side of an order in a trading system (either buy or sell).

Enumerator
Buy 

Represents a buy order.

Sell 

Represents a sell order.

Function Documentation

◆ sideToString()

std::string sideToString ( Side  side)
inline

Converts a Side value to its corresponding string representation.

This function provides a string representation of each order side for display or logging.

Parameters
sideThe Side value to convert to a string.
Returns
A string representing the side of the order (e.g., "Buy" or "Sell").