This commit is contained in:
2024-08-07 09:16:27 -04:00
parent fdfadd5c7e
commit 5f971cf684
5200 changed files with 731717 additions and 0 deletions

48
http/EMIT.CPP Normal file
View File

@@ -0,0 +1,48 @@
#include <string.h>
#include <http/emit.hpp>
Emit::Emit(PureViewOfFile &inputView,PureViewOfFile &outputView)
: mIsEmitting(TRUE), mInputView(inputView), mOutputView(outputView)
{
}
Emit::~Emit()
{
}
void Emit::emit(int code,int type,int identifier)const
{
if(!mIsEmitting)return;
mOutputView.write(code);
mOutputView.write(type);
mOutputView.write(identifier);
}
void Emit::emit(int code,double value)const
{
if(!mIsEmitting)return;
mOutputView.write(code);
mOutputView.write(value);
}
void Emit::emit(int code,int op)const
{
if(!mIsEmitting)return;
mOutputView.write(code);
mOutputView.write(op);
}
void Emit::emit(const char *lpLiteralValue)const
{
if(!mIsEmitting||!lpLiteralValue)return;
mOutputView.write(String(lpLiteralValue));
}
void Emit::emit(const String &literalValue)const
{
if(!mIsEmitting||literalValue.isNull())return;
int stringLength(literalValue.length());
mOutputView.write(stringLength);
mOutputView.write(literalValue);
}