当前位置: 首页>>代码示例>>C++>>正文


C++ Version函数代码示例

本文整理汇总了C++中Version函数的典型用法代码示例。如果您正苦于以下问题:C++ Version函数的具体用法?C++ Version怎么用?C++ Version使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了Version函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: GetVersion

	virtual Version GetVersion()
	{
		return Version("Allows locking of the server to stop all incoming connections until unlocked again", VF_VENDOR);
	}
开发者ID:asterIRC,项目名称:twirlircd,代码行数:4,代码来源:m_lockserv.cpp

示例2: GetVersion

		Version GetVersion()
		{
			return Version("Allows the customisation of penalty levels.");
		}
开发者ID:AntiDjin,项目名称:inspircd-extras,代码行数:4,代码来源:m_custompenalty.cpp

示例3: GenerateAvahiConfig

static int GenerateAvahiConfig(const char *path)
{
    FILE *fout;
    Writer *writer = NULL;
    fout = fopen(path, "w+");
    if (fout == NULL)
    {
        CfOut(OUTPUT_LEVEL_ERROR, "", "Unable to open %s", path);
        return -1;
    }
    writer = FileWriter(fout);
    fprintf(fout, "<?xml version=\"1.0\" standalone='no'?>\n");
    fprintf(fout, "<!DOCTYPE service-group SYSTEM \"avahi-service.dtd\">\n");
    XmlComment(writer, "This file has been automatically generated by cf-serverd.");
    XmlStartTag(writer, "service-group", 0);
#ifdef HAVE_NOVA
    fprintf(fout,"<name replace-wildcards=\"yes\" >CFEngine Enterprise %s Policy Hub on %s </name>\n", Version(), "%h");
#else
    fprintf(fout,"<name replace-wildcards=\"yes\" >CFEngine Community %s Policy Server on %s </name>\n", Version(), "%h");
#endif
    XmlStartTag(writer, "service", 0);
    XmlTag(writer, "type", "_cfenginehub._tcp",0);
    DetermineCfenginePort();
    XmlTag(writer, "port", STR_CFENGINEPORT, 0);
    XmlEndTag(writer, "service");
    XmlEndTag(writer, "service-group");
    fclose(fout);

    return 0;
}
开发者ID:FancsalMelinda,项目名称:core,代码行数:30,代码来源:cf-serverd-functions.c

示例4: UNROLLED_LOOPS_FEATURE

namespace otawa {

static SilentFeature::Maker<LoopUnroller> UNROLLED_LOOPS_MAKER;
/**
 * This feature that the loops have been unrolled at least once.
 *
 * @ingroup cfg
 */
SilentFeature UNROLLED_LOOPS_FEATURE ("otawa::UNROLLED_LOOPS_FEATURE", UNROLLED_LOOPS_MAKER);

/**
 * Put on the header ex-header of a loop, this property gives the BB of the unrolled loop.
 *
 * @par Hooks
 * @li @ref BasicBlock
 *
 * @ingroup cfg
 */
Identifier<BasicBlock*> UNROLLED_FROM("otawa::UNROLLED_FROM", 0);


/**
 * @class LoopUnroller
 *
 * This processor unrolls the first iteration of each loop
 *
 * @par Configuration
 * none
 *
 * @par Required features
 * @li @ref DOMINANCE_FEATURE
 * @li @ref LOOP_HEADERS_FEATURE
 * @li @ref FLOW_FACT_FEATURE
 * @li @ref LOOP_INFO_FEATURE
 * @li @ref COLLECTED_CFGS_FEATURE

 *
 * @par Provided features
 * @li @ref UNROLLED_LOOPS_FEATURE
 *
 * @par Statistics
 * none
 *
 * @ingroup cfg
 */

p::declare LoopUnroller::reg = p::init("otawa::LoopUnroller", Version(1, 1, 0))
	.base(Processor::reg)
	.maker<LoopUnroller>()
	.use(DOMINANCE_FEATURE)
	.use(LOOP_HEADERS_FEATURE)
	.use(LOOP_INFO_FEATURE)
	.use(COLLECTED_CFG_FEATURE)
	.invalidate(COLLECTED_CFG_FEATURE)
	.provide(COLLECTED_CFG_FEATURE)
	.provide(UNROLLED_LOOPS_FEATURE);


LoopUnroller::LoopUnroller(p::declare& r): Processor(r), coll(new CFGCollection()), idx(0) {
}

void LoopUnroller::processWorkSpace(otawa::WorkSpace *fw) {
	int cfgidx = 0;
	const CFGCollection *orig_coll = INVOLVED_CFGS(fw);

	// Create the new VCFG collection first, so that it will be available when we do the loop unrolling
	for (CFGCollection::Iterator cfg(*orig_coll); cfg; cfg++, cfgidx++) {
		VirtualCFG *vcfg = new VirtualCFG(false);
		coll->add(vcfg);
		INDEX(vcfg) = cfgidx;
		vcfg->addBB(vcfg->entry());
	}


	cfgidx = 0;
	for (CFGCollection::Iterator vcfg(*coll), cfg(*orig_coll); vcfg; vcfg++, cfg++) {
		ASSERT(INDEX(vcfg) == INDEX(cfg));
		LABEL(vcfg) = cfg->label();
		INDEX(vcfg->entry()) = 0;


		idx = 1;
//		if (isVerbose()) {
			cout << "Processing CFG: " << cfg->label() << "\n";
		//}

		/* !!GRUIK!! Ca serait bien d'avoir une classe VCFGCollection */
		VirtualCFG *casted_vcfg = static_cast<otawa::VirtualCFG*>((otawa::CFG*)vcfg);

		unroll((otawa::CFG*) cfg, 0, casted_vcfg);
		if (ENTRY_CFG(fw) == cfg)
			ENTRY_CFG(fw) = vcfg;

		casted_vcfg->addBB(vcfg->exit());
		INDEX(vcfg->exit()) = idx;
	}
}


/**
//.........这里部分代码省略.........
开发者ID:alexjordan,项目名称:otawa,代码行数:101,代码来源:cfg_LoopUnroller.cpp

示例5: GetVersion

	Version GetVersion() override
	{
		return Version("Provides custom prefix channel modes", VF_VENDOR);
	}
开发者ID:Adam-,项目名称:inspircd,代码行数:4,代码来源:m_customprefix.cpp

示例6: GetVersion

	Version GetVersion()
	{
		return Version("Provides channel mode +" + ConvToStr(mf.GetModeChar()) + " (slowmode)");
	}
开发者ID:AntiDjin,项目名称:inspircd-extras,代码行数:4,代码来源:m_slowmode.cpp

示例7: GetVersion

	Version GetVersion() override
	{
		return Version("Provides the +E channel mode - for blocking of similar messages", VF_COMMON|VF_VENDOR, rm.GetModuleSettings());
	}
开发者ID:Adam-,项目名称:inspircd,代码行数:4,代码来源:m_repeat.cpp

示例8: GetVersion

	virtual Version GetVersion()
	{
		return Version("Provides support for channel mode +P to provide permanent channels",VF_VENDOR);
	}
开发者ID:Shawn-Smith,项目名称:InspIRCd,代码行数:4,代码来源:m_permchannels.cpp

示例9: GetTexture2DNameIndex

		Int							GetTexture2DNameIndex(
										const String &name) const;
		const String&				GetSpriteSheetName(Int index) const;
		Int							GetSpriteSheetNameIndex(
										const String &name) const;
		Int							GetNumCollisionModels() const;
		SpriteCollisionModel*		GetCollisionModel(Int index);
		const SpriteCollisionModel&	GetCollisionModel(Int index) const;
		Int							GetCollisionModelIndex(
										const String &name) const;
		Int							GetNumFrameConfigs() const;
		SpriteFrameConfig*			GetFrameConfig(Int index);
		const SpriteFrameConfig&	GetFrameConfig(Int index) const;
		Int							GetFrameConfigIndex(
										const String &name) const;
		Int							GetNumActions() const;
		SpriteAction*				GetAction(Int index);
		const SpriteAction&			GetAction(Int index) const;
		Int							GetActionIndex(const String &name) const;
		// Misc
		ErrorType	SaveAs(const String &fileName,
						const Version &version = Version(0, 1));
		// Operators
		SpriteData&	operator= (const SpriteData &that);
		Bool		operator==(const SpriteData &that) const;
		Bool		operator!=(const SpriteData &that) const;
	};
}

#endif // FastSpriteDataHppIncluded
开发者ID:JSandrew4,项目名称:FastGdk,代码行数:30,代码来源:SpriteData.hpp

示例10: applicationVersion

const Version	applicationVersion()			{
    return Version( WOLFRAME_MAJOR_VERSION, WOLFRAME_MINOR_VERSION ,WOLFRAME_REVISION);
}
开发者ID:ProjectTegano,项目名称:Tegano,代码行数:3,代码来源:appProperties.cpp

示例11: switch

bool CCheatMgr::Process( CheatCode nCheatCode, CParsedMsg &cMsg )
{
	if ( nCheatCode <= CHEAT_NONE || nCheatCode >= CHEAT_MAX ) return false;

#ifdef _FINAL
	// Don't do cheats in multiplayer...
    if (IsMultiplayerGame())
	{
		// Well, okay, let them toggle between 1st and 3rd person ;)
		// and, well, blood is pretty cool...
		switch ( nCheatCode )
		{
			case CHEAT_CHASETOGGLE:
				ChaseToggle();
			break;

			case CHEAT_EXITLEVEL:	// exit the current level
				SetExitLevel();
			break;

			case CHEAT_NEXTMISSION:	// exit the current mission
				NextMission();
			break;

			case CHEAT_BOOT:		// boot players
				BootPlayer(cMsg);
			break;

			default :
				return false;
			break;
		}

		m_bPlayerCheated = LTTRUE;
		return true;
	}
#endif // _FINAL

	// process cheat codes
	switch ( nCheatCode )
	{
		case CHEAT_GOD:			// god mode toggle
			SetGodMode(!s_CheatInfo[nCheatCode].bActive);
		break;

		case CHEAT_SKILLZ:		// give em skill points
			GetSkills();
		break;

		case CHEAT_ARMOR:		// full armor
			SetArmor();
		break;

		case CHEAT_HEALTH:		// full health
			SetHealth();
		break;

		case CHEAT_EXITLEVEL:	// exit the current level
			SetExitLevel();
		break;

		case CHEAT_VERSION:		// display version info
			Version();
		break;

		case CHEAT_BUILDGUID:	// display build guid
			BuildGuid();
		break;

		case CHEAT_INVISIBLE:	// time to mess with the AI
			SetInvisible(!s_CheatInfo[nCheatCode].bActive);
		break;

		case CHEAT_BODYGOLFING:	// bodies fly far	
			BodyGolfing(!s_CheatInfo[nCheatCode].bActive);
		break;

		case CHEAT_POS:			// show/hide player position
			SetPos(!s_CheatInfo[nCheatCode].bActive);
		break;

#ifndef _TO2DEMO
		
		case CHEAT_KFA:			// give em everything
			SetKFA();
		break;

		case CHEAT_AMMO:		// full ammo
			SetAmmo();
		break;

		case CHEAT_MODSQUAD:	// give all mods for current weapons
			ModSquad();
		break;

		case CHEAT_CONSOLE:
			SetConsole(!s_CheatInfo[nCheatCode].bActive);
		break;

		case CHEAT_NEXTMISSION:	// exit the current mission
//.........这里部分代码省略.........
开发者ID:rickyharis39,项目名称:nolf2,代码行数:101,代码来源:CheatMgr.cpp

示例12: GetVersion

	Version GetVersion()
	{
		return Version("Reports ircd stats to a locally running Telegraf instance");
	}
开发者ID:snoonetIRC,项目名称:inspircd-modules,代码行数:4,代码来源:m_telegraf.cpp

示例13: TexinfoManual

void TexinfoManual(const char *source_dir, const char *output_file)
{
    char filename[CF_BUFSIZE];
    const SubTypeSyntax *st;
    Item *done = NULL;
    FILE *fout;
    int i;

    if ((fout = fopen(output_file, "w")) == NULL)
    {
        CfOut(cf_error, "fopen", "Unable to open %s for writing\n", filename);
        return;
    }

    TexinfoHeader(fout);

/* General background */

    fprintf(fout, "@c *****************************************************\n");
    fprintf(fout, "@c * CHAPTER \n");
    fprintf(fout, "@c *****************************************************\n");

    fprintf(fout, "@node Getting started\[email protected] CFEngine %s -- Getting started\n\n", Version());
    IncludeManualFile(source_dir, fout, "reference_basics.texinfo");

/* Control promises */

    fprintf(fout, "@c *****************************************************\n");
    fprintf(fout, "@c * CHAPTER \n");
    fprintf(fout, "@c *****************************************************\n");

    fprintf(fout, "@node Control Promises\[email protected] Control promises\n\n");
    IncludeManualFile(source_dir, fout, "reference_control_intro.texinfo");

    fprintf(fout, "@menu\n");
    for (i = 0; CF_ALL_BODIES[i].bundle_type != NULL; ++i)
    {
        fprintf(fout, "* control %s::\n", CF_ALL_BODIES[i].bundle_type);
    }
    fprintf(fout, "@end menu\n");

    for (i = 0; CF_ALL_BODIES[i].bundle_type != NULL; i++)
    {
        fprintf(fout, "@node control %s\[email protected] @code{%s} control promises\n\n", CF_ALL_BODIES[i].bundle_type,
                CF_ALL_BODIES[i].bundle_type);
        snprintf(filename, CF_BUFSIZE - 1, "control/%s_example.texinfo", CF_ALL_BODIES[i].bundle_type);
        IncludeManualFile(source_dir, fout, filename);
        snprintf(filename, CF_BUFSIZE - 1, "control/%s_notes.texinfo", CF_ALL_BODIES[i].bundle_type);
        IncludeManualFile(source_dir, fout, filename);

        TexinfoBodyParts(source_dir, fout, CF_ALL_BODIES[i].bs, CF_ALL_BODIES[i].bundle_type);
    }

/* Components */

    for (i = 0; i < CF3_MODULES; i++)
    {
        st = (CF_ALL_SUBTYPES[i]);

        if ((st == CF_COMMON_SUBTYPES) || (st == CF_EXEC_SUBTYPES) || (st == CF_REMACCESS_SUBTYPES)
            || (st == CF_KNOWLEDGE_SUBTYPES) || (st == CF_MEASUREMENT_SUBTYPES))

        {
            CfOut(cf_verbose, "", "Dealing with chapter / bundle type %s\n", st->bundle_type);
            fprintf(fout, "@c *****************************************************\n");
            fprintf(fout, "@c * CHAPTER \n");
            fprintf(fout, "@c *****************************************************\n");

            if (strcmp(st->bundle_type, "*") == 0)
            {
                fprintf(fout, "@node Bundles for common\[email protected] Bundles of @code{common}\n\n");
            }
            else
            {
                fprintf(fout, "@node Bundles for %s\[email protected] Bundles of @code{%s}\n\n", st->bundle_type, st->bundle_type);
            }
        }

        if (!IsItemIn(done, st->bundle_type)) /* Avoid multiple reading if several modules */
        {
            PrependItem(&done, st->bundle_type, NULL);
            snprintf(filename, CF_BUFSIZE - 1, "bundletypes/%s_example.texinfo", st->bundle_type);
            IncludeManualFile(source_dir, fout, filename);
            snprintf(filename, CF_BUFSIZE - 1, "bundletypes/%s_notes.texinfo", st->bundle_type);
            IncludeManualFile(source_dir, fout, filename);

            fprintf(fout, "@menu\n");
            for (int k = 0; k < CF3_MODULES; ++k)
            {
                for (int j = 0; CF_ALL_SUBTYPES[k][j].bundle_type != NULL; ++j)
                {
                    const char *constraint_type_name;
                    if (strcmp(CF_ALL_SUBTYPES[k][j].subtype, "*") == 0)
                    {
                        constraint_type_name = "Miscellaneous";
                    }
                    else
                    {
                        constraint_type_name = CF_ALL_SUBTYPES[k][j].subtype;
                    }
//.........这里部分代码省略.........
开发者ID:FraserMCampbell,项目名称:core,代码行数:101,代码来源:manual.c

示例14: lgw_spi_open

/* SPI initialization and configuration */
int lgw_spi_open(void **spi_target_ptr) {
	struct mpsse_context *mpsse = NULL;
	int a, b;
	
	/* check input variables */
	CHECK_NULL(spi_target_ptr); /* cannot be null, must point on a void pointer (*spi_target_ptr can be null) */
	
	/* try to open the first available FTDI device matching VID/PID parameters */
	mpsse = OpenIndex(VID,PID,SPI0, SIX_MHZ, MSB, IFACE_A, NULL, NULL, 0);
	if (mpsse == NULL) {
		DEBUG_MSG("ERROR: MPSSE OPEN FUNCTION RETURNED NULL\n");
		return LGW_SPI_ERROR;
	}
	if (mpsse->open != 1) {
		DEBUG_MSG("ERROR: MPSSE OPEN FUNCTION FAILED\n");
		return LGW_SPI_ERROR;
	}
	
#ifdef _MULTITECH_H_
	/* toggle pin ADBUS5 of the FT232H */
	/* On the MTAC LORA, it resets the SX1301 */
	a = PinLow(mpsse, GPIOL1);
	b = PinHigh(mpsse, GPIOL1);
#else
	/* toggle pin ADBUS5 of the FT2232H */
	/* On the Semtech reference board, it resets the SX1301 */
	a = PinHigh(mpsse, GPIOL1);
	b = PinLow(mpsse, GPIOL1);
#endif
	if ((a != MPSSE_OK) || (b != MPSSE_OK)) {
		DEBUG_MSG("ERROR: IMPOSSIBLE TO TOGGLE GPIOL1/ADBUS5\n");
		return LGW_SPI_ERROR;
	}
	
	DEBUG_PRINTF("SPI port opened and configured ok\ndesc: %s\nPID: 0x%04X\nVID: 0x%04X\nclock: %d\nLibmpsse version: 0x%02X\n", GetDescription(mpsse), GetPid(mpsse), GetVid(mpsse), GetClock(mpsse), Version());
	*spi_target_ptr = (void *)mpsse;
	return LGW_SPI_SUCCESS;
}
开发者ID:kersing,项目名称:lora_gateway,代码行数:39,代码来源:loragw_spi.ftdi.c

示例15: Demand_Service

PlanSum::PlanSum (void) : Demand_Service ()
{
	Program ("PlanSum");
	Version ("4.0.59");
	Title ("Summarize Plan File Demand");

	Network_File optional_network [] = {
		DIRECTORY, LINK, NODE, LANE_USE, PARKING, ACTIVITY_LOCATION, PROCESS_LINK,
		LANE_CONNECTIVITY, TRANSIT_STOP, TRANSIT_ROUTE, TRANSIT_SCHEDULE, 
		TRANSIT_DRIVER, END_NETWORK
	};
	Demand_File optional_demand [] = {
		LINK_DELAY, VEHICLE_TYPE, NEW_LINK_DELAY, NEW_RIDERSHIP, END_DEMAND
	};

	char *keys [] = {
		PLAN_FILE,
		PLAN_FORMAT,
		NODE_LIST_PATHS,
		HOUSEHOLD_LIST,
		HOUSEHOLD_PERSON_COUNT,
		SUMMARY_TIME_PERIODS,
		SUMMARY_TIME_INCREMENT,
		NEW_PLAN_FILE,
		NEW_LINK_VOLUME_FILE,
		NEW_LINK_VOLUME_FORMAT,
		KEEP_INPUT_TRAVEL_TIMES,
		EQUATION_PARAMETERS_x,
		LINK_EQUIVALENCE_FILE,
		NEW_TRIP_TIME_FILE,
		NEW_ZONE_SKIM_FILE,
		NEW_ZONE_SKIM_FORMAT,
		SKIM_MODE_SELECTION,
		SKIM_TOTAL_TIME,
		SKIM_TRIP_LENGTH,
		SKIM_TIME_CONTROL_POINT,
		NEAREST_NEIGHBOR_FACTOR,
		NEW_TRIP_TABLE_FILE,
		NEW_TRIP_TABLE_FORMAT,
		TRIP_MODE_SELECTION,
		ZONE_EQUIVALENCE_FILE,
		NEW_TURN_MOVEMENT_FILE,
		NEW_TURN_MOVEMENT_FORMAT,
		TURN_NODE_RANGE,
		STOP_EQUIVALENCE_FILE,
		OUTPUT_ALL_TRANSIT_STOPS,
		NULL
	};
	char *reports [] = {
		"TOP_100_V/C_RATIOS",
		"ALL_V/C_RATIOS_GREATER_THAN_*",
		"LINK_GROUP_V/C_RATIOS_*",
		"PRINT_LINK_EQUIVALENCIES",
		"PRINT_ZONE_EQUIVALENCIES",
		"PRINT_STOP_EQUIVALENCIES",
		"TRANSIT_RIDERSHIP_SUMMARY",
		"TRANSIT_STOP_SUMMARY",
		"TRANSIT_TRANSFER_SUMMARY",
		"TRANSIT_TRANSFER_DETAILS",
		"TRANSIT_STOP_GROUP_SUMMARY",
		"TRANSIT_PASSENGER_SUMMARY",
		"TRANSIT_LINK_GROUP_SUMMARY",
		"TRIP_TIME_REPORT",
		"TRAVEL_SUMMARY_REPORT",
		NULL
	};

	Optional_Network_Files (optional_network);
	Optional_Demand_Files (optional_demand);

	Key_List (keys);
	Report_List (reports);
	Enable_Partitions (true);

	AB_Key_Flag  (true);

	volume_flag = time_flag = skim_flag = trip_flag = zone_flag = transit_flag = passenger_flag = false;
	delay_in = delay_out = turn_flag = turn_delay = hhlist_flag = travel_flag = update_flag = false;
	time_skim_flag = xfer_flag = xfer_detail = neighbor_flag = length_flag = count_flag = stops_flag = false;
	type_flag = vc_flag = true;

	layer = 1;

	increment = 900;
	num_inc = 96;
	cap_factor = 0.25;
	neighbor_factor = 0.5;
	skim_point = 2;

	movement_data = NULL;
	node_range = NULL;
	boardings = NULL;

	max_rail = 0;
	xfer_label [0] = '\0';

	stop_array = (Stop_Array *) new Transfer_Array ();
}
开发者ID:kravitz,项目名称:transims4,代码行数:98,代码来源:PlanSum.cpp


注:本文中的Version函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。