CCallHelpers::JumpList generate(AccessGenerationState& state, const RegisterSet& usedRegistersBySnippet, CCallHelpers& jit) override
 {
     m_from.link(&jit);
     CCallHelpers::JumpList exceptions = generateImpl(state, usedRegistersBySnippet, jit, std::make_index_sequence<std::tuple_size<std::tuple<Arguments...>>::value>());
     jit.jump().linkTo(m_to, &jit);
     return exceptions;
 }
void component::generate
	(const generationContext& ctx,
	 utility::outputStream& outputStream,
	 const string::size_type curLinePos,
	 string::size_type* newLinePos) const
{
	generateImpl(ctx, outputStream, curLinePos, newLinePos);
}
void component::generate
	(utility::outputStream& os,
	 const string::size_type curLinePos,
	 string::size_type* newLinePos) const
{
	generateImpl(generationContext::getDefaultContext(),
		os, curLinePos, newLinePos);
}
示例#4
0
void component::generate
	(ref <utility::outputStream> os,
	 const string::size_type maxLineLength,
	 const string::size_type curLinePos,
	 string::size_type* newLinePos) const
{
	generateImpl(*os, maxLineLength, curLinePos, newLinePos);
}
示例#5
0
const string emailAddress::toString() const
{
	std::ostringstream oss;
	utility::outputStreamAdapter adapter(oss);

	generationContext ctx(generationContext::getDefaultContext());
	ctx.setMaxLineLength(lineLengthLimits::infinite);

	generateImpl(ctx, adapter, 0, NULL);

	return oss.str();
}
示例#6
0
string component::generate
	(size_t maxLineLength, size_t curLinePos) const
{
	std::ostringstream oss;
	utility::outputStreamAdapter adapter(oss);

	generationContext ctx(generationContext::getDefaultContext());
	ctx.setMaxLineLength(maxLineLength);

	generateImpl(ctx, adapter, curLinePos, NULL);

	return oss.str();
}
示例#7
0
void Sdp::generate(const std::string& local_address)
{
    util::TimeUtil time;
    boost::uint64_t now_ntp_time_stamp = time.getCurrentTimeByNtpTimeStamp();

    {
        m_protocol_version = "0";
        m_sdp_stream << "v=" << m_protocol_version << "\r\n";
    }
    {
        m_origin.user_name = "-";
        m_origin.session_id = util::toString<std::string>(now_ntp_time_stamp);
        m_origin.session_version = getSessionVersion();
        m_origin.nettype = "IN";
        m_origin.addrtype = "IP4";
        m_origin.unicast_address = local_address;
        m_sdp_stream << "o=" << m_origin.user_name << " "
                             << m_origin.session_id << " "
                             << m_origin.session_version << " "
                             << m_origin.nettype << " "
                             << m_origin.addrtype << " "
                             << m_origin.unicast_address << "\r\n";
    }
    {
        m_session_name = " ";
        m_sdp_stream << "s=" << m_session_name << "\r\n";
    }
    {
        m_connection_data.nettype = "IN";
        m_connection_data.addrtype = "IP4";
        m_connection_data.connection_address = "0.0.0.0";
        m_sdp_stream << "c=" << m_connection_data.nettype << " "
                             << m_connection_data.addrtype << " "
                             << m_connection_data.connection_address << "\r\n";
    }
    {
        m_timing.start_time = "0";
        m_timing.stop_time = "0";
        m_sdp_stream << "t=" << m_timing.start_time << " "
                             << m_timing.stop_time << "\r\n";
    }

    generateImpl();
}
示例#8
0
void SP_DPClassCodeRender :: generateCpp( SP_DPSyntaxTree * syntaxTree, FILE * writer )
{
	{
		char filename[ 128 ] = { 0 }, structFile[ 128 ] = { 0 };
		mNameRender->getClassFileName( syntaxTree->getName(), filename, sizeof( filename ) );
		mNameRender->getFileName( syntaxTree->getName(), structFile, sizeof( structFile ) );

		fprintf( writer, "/* %s.hpp\n", filename );
		fprintf( writer, "   Generated by spxml2struct from %s\n\n", syntaxTree->getDefineFile() );
		fprintf( writer, "   !!! DO NOT EDIT !!!\n\n" );
		fprintf( writer, "*/\n" );
		fprintf( writer, "\n" );

		fprintf( writer, "#include <stdlib.h>\n" );
		fprintf( writer, "#include <string.h>\n\n" );

		fprintf( writer, "#include \"%s.hpp\"\n", structFile );
		fprintf( writer, "#include \"%s.hpp\"\n", filename );
		fprintf( writer, "\n" );
	}

	{
		char pickleName[ 128 ] = { 0 };
		mNameRender->getPickleName( syntaxTree->getName(), pickleName, sizeof( pickleName ) );

		SP_DPSyntaxStructVector * slist = syntaxTree->getStructList();

		SP_DPSyntaxStructVector::iterator sit = slist->begin();

		for( ; slist->end() != sit; ++sit ) {
			generateFake( pickleName, syntaxTree, &(*sit), writer );
			generateImpl( pickleName, &(*sit), writer );

			fprintf( writer, "//============================================================\n\n" );
		}

		fprintf( writer, "\n" );
	}
}