Photon Engine 2.0.0-beta
A physically based renderer.
Loading...
Searching...
No Matches
ph::SdlInlinePacketInterface Class Reference

Supports the case where the packet command stores SDL clauses directly. More...

#include <SdlInlinePacketInterface.h>

Inheritance diagram for ph::SdlInlinePacketInterface:
ph::SdlDataPacketInterface

Public Member Functions

 SdlInlinePacketInterface ()
 
 SdlInlinePacketInterface (int clauseIndentAmount, char clauseIndentChar)
 
void parse (std::string_view packetCommand, const SdlInputContext &ctx, std::string_view targetName, ISdlResource *targetInstance, SdlInputClauses &out_clauses) const override
 Turn a packet command into out_clauses.
 
void generate (const SdlOutputClauses &clauses, const SdlOutputContext &ctx, std::string_view targetName, const ISdlResource *targetInstance, std::string &out_packetCommand) const override
 Turn all data in the clauses into a packet command.
 
- Public Member Functions inherited from ph::SdlDataPacketInterface
 SdlDataPacketInterface ()
 
virtual ~SdlDataPacketInterface ()
 

Detailed Description

Supports the case where the packet command stores SDL clauses directly.

Constructor & Destructor Documentation

◆ SdlInlinePacketInterface() [1/2]

ph::SdlInlinePacketInterface::SdlInlinePacketInterface ( )

◆ SdlInlinePacketInterface() [2/2]

ph::SdlInlinePacketInterface::SdlInlinePacketInterface ( int clauseIndentAmount,
char clauseIndentChar )
Parameters
clauseIndentAmountControls how much to indent each clause during clause generation. Possible values: -1 = No indentation. All clauses are on the same line. 0 = No indentation. Each clause will be placed on a new line. >0 = Indent each clause by the specified amount of clauseIndentChar.
clauseIndentCharCharacter used for indentation during clause generation. Must be a whitespace.

Member Function Documentation

◆ generate()

void ph::SdlInlinePacketInterface::generate ( const SdlOutputClauses & clauses,
const SdlOutputContext & ctx,
std::string_view targetName,
const ISdlResource * targetInstance,
std::string & out_packetCommand ) const
overridevirtual

Turn all data in the clauses into a packet command.

Parameters
targetClassThe class current packet is being generated for. Null if unavailable.
targetNameThe target's name current packet is being generated for. Empty if unavailable.
targetInstancePointer to the instance current packet is being generated for. Null if unavailable.
[out]out_packetCommandGenerated packet command. Results are appended.

Implements ph::SdlDataPacketInterface.

◆ parse()

void ph::SdlInlinePacketInterface::parse ( std::string_view packetCommand,
const SdlInputContext & ctx,
std::string_view targetName,
ISdlResource * targetInstance,
SdlInputClauses & out_clauses ) const
overridevirtual

Turn a packet command into out_clauses.

Parameters
targetClassThe class current packet is being parsed for. Null if unavailable.
targetNameThe target's name current packet is being parsed for. Empty if unavailable.
targetInstancePointer to the instance current packet is being parsed for. Null if unavailable.
[out]out_clausesParsed clauses. Results are appended and will be used for initializing the target instance.

Implements ph::SdlDataPacketInterface.


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