CSCI 3081 - Drone Delivery System
All Classes Files Functions Variables Friends Pages
Public Member Functions | Protected Attributes | List of all members
entity_project::WebSceneViewer Class Reference

A web viewer for the entity system that uses web sockets. More...

#include <web_scene_viewer.h>

Inheritance diagram for entity_project::WebSceneViewer:
Inheritance graph

Public Member Functions

 WebSceneViewer (int port, const std::string &webDir, const std::string &scene)
 Constructor that initializes with a port and a website directory.
 
virtual ~WebSceneViewer ()
 Destructor.
 
void SetEntitySystem (IEntitySystem *entitySystem)
 Sets the current entity system. More...
 
virtual IEntitySystemGetEntitySystem () const
 Returns the current entity system.
 
bool Run ()
 Runs the web viewer.
 
void OnEvent (const picojson::value &event, const IEntity &entity)
 Sends events to the web page over web sockets.
 
void SendJSON (const picojson::value &json)
 Sends JSON to all web clients.
 
- Public Member Functions inherited from entity_project::ISceneViewer
virtual ~ISceneViewer ()
 Destructor.
 
- Public Member Functions inherited from entity_project::IEntityObserver
virtual ~IEntityObserver ()
 Destructor.
 

Protected Attributes

IEntitySystementitySystem_
 The current entity system.
 

Detailed Description

A web viewer for the entity system that uses web sockets.

Member Function Documentation

◆ SetEntitySystem()

void entity_project::WebSceneViewer::SetEntitySystem ( IEntitySystem entitySystem)
virtual

Sets the current entity system.

This is overriden so that the web viewer can observe entities.

Implements entity_project::ISceneViewer.


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