• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C++ GetConfiguration函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: reg_query_winscp_value_ex

long reg_query_winscp_value_ex(HKEY Key, const char * ValueName, unsigned long * /*Reserved*/,
  unsigned long * Type, uint8_t * Data, unsigned long * DataSize)
{
  long R;
  DebugAssert(GetConfiguration() != nullptr);

  THierarchicalStorage * Storage = reinterpret_cast<THierarchicalStorage *>(Key);
  AnsiString Value;
  if (Storage == nullptr)
  {
    if (UnicodeString(ValueName) == L"RandSeedFile")
    {
      Value = AnsiString(GetConfiguration()->GetRandomSeedFileName());
      R = ERROR_SUCCESS;
    }
    else
    {
      DebugFail();
      R = ERROR_READ_FAULT;
    }
  }
  else
  {
    if (Storage->ValueExists(ValueName))
    {
      Value = AnsiString(Storage->ReadStringRaw(ValueName, L""));
      R = ERROR_SUCCESS;
    }
    else
    {
      R = ERROR_READ_FAULT;
    }
  }

  if (R == ERROR_SUCCESS)
  {
    DebugAssert(Type != nullptr);
    *Type = REG_SZ;
    char * DataStr = reinterpret_cast<char *>(Data);
    int sz = static_cast<int>(*DataSize);
    if (sz > 0)
    {
        strncpy(DataStr, Value.c_str(), sz);
        DataStr[sz - 1] = '\0';
    }
    *DataSize = static_cast<uint32_t>(strlen(DataStr));
  }

  return R;
}
开发者ID:elfmz,项目名称:far2l,代码行数:50,代码来源:PuttyIntf.cpp


示例2: GetConfiguration

// get short name for loft
std::string CCPACSFuselage::GetShortShapeName ()
{
    unsigned int findex = 0;
    for (int i = 1; i <= GetConfiguration().GetFuselageCount(); ++i) {
        tigl::CCPACSFuselage& f = GetConfiguration().GetFuselage(i);
        if (GetUID() == f.GetUID()) {
            findex = i;
            std::stringstream shortName;
            shortName << "F" << findex;
            return shortName.str();
        }
    }
    return "UNKNOWN";
}
开发者ID:gstariarch,项目名称:tigl,代码行数:15,代码来源:CCPACSFuselage.cpp


示例3: GetConfiguration

int CMPIPTV_RTSP::Initialize(HANDLE lockMutex, CParameterCollection *configuration)
{
  if (configuration != NULL)
  {
    CParameterCollection *vlcParameters = GetConfiguration(&this->logger, PROTOCOL_IMPLEMENTATION_NAME, METHOD_INITIALIZE_NAME, CONFIGURATION_SECTION_UDP);
    configuration->Append(vlcParameters);
    delete vlcParameters;
  }

  int result = this->CMPIPTV_UDP::Initialize(lockMutex, configuration);

  this->receiveDataTimeout = this->configurationParameters->GetValueLong(CONFIGURATION_RTSP_RECEIVE_DATA_TIMEOUT, true, RTSP_RECEIVE_DATA_TIMEOUT_DEFAULT);
  this->rtspUdpSinkMaxPayloadSize = this->configurationParameters->GetValueUnsignedInt(CONFIGURATION_RTSP_UDP_SINK_MAX_PAYLOAD_SIZE, true, RTSP_UDP_SINK_MAX_PAYLOAD_SIZE_DEFAULT);
  this->rtspUdpPortRangeStart = this->configurationParameters->GetValueLong(CONFIGURATION_RTSP_UDP_PORT_RANGE_START, true, RTSP_UDP_PORT_RANGE_START_DEFAULT);
  this->rtspUdpPortRangeEnd = this->configurationParameters->GetValueLong(CONFIGURATION_RTSP_UDP_PORT_RANGE_END, true, RTSP_UDP_PORT_RANGE_END_DEFAULT);
  this->rtspTeardownRequestMaximumCount = this->configurationParameters->GetValueLong(CONFIGURATION_RTSP_TEARDOWN_REQUEST_MAXIMUM_COUNT, true, RTSP_TEARDOWN_REQUEST_MAXIMUM_COUNT_DEFAULT);
  this->rtspTeardownRequestTimeout = this->configurationParameters->GetValueLong(CONFIGURATION_RTSP_TEARDOWN_REQUEST_TIMEOUT, true, RTSP_TEARDOWN_REQUEST_TIMEOUT_DEFAULT);
  this->openConnetionMaximumAttempts = this->configurationParameters->GetValueLong(CONFIGURATION_RTSP_OPEN_CONNECTION_MAXIMUM_ATTEMPTS, true, RTSP_OPEN_CONNECTION_MAXIMUM_ATTEMPTS_DEFAULT);

  this->receiveDataTimeout = (this->receiveDataTimeout < 0) ? RTSP_RECEIVE_DATA_TIMEOUT_DEFAULT : this->receiveDataTimeout;
  this->rtspUdpSinkMaxPayloadSize = (this->rtspUdpSinkMaxPayloadSize < 0) ? RTSP_UDP_SINK_MAX_PAYLOAD_SIZE_DEFAULT : this->rtspUdpSinkMaxPayloadSize;
  this->rtspUdpPortRangeStart = (this->rtspUdpPortRangeStart <= 1024) ? RTSP_UDP_PORT_RANGE_START_DEFAULT : this->rtspUdpPortRangeStart;
  this->rtspUdpPortRangeEnd = (this->rtspUdpPortRangeEnd < this->rtspUdpPortRangeStart) ? min(65535, this->rtspUdpPortRangeStart + 1000) : min(65535, this->rtspUdpPortRangeEnd);
  this->rtspTeardownRequestMaximumCount = (this->rtspTeardownRequestMaximumCount <= 0) ? RTSP_TEARDOWN_REQUEST_MAXIMUM_COUNT_DEFAULT : this->rtspTeardownRequestMaximumCount;
  this->rtspTeardownRequestTimeout = (this->rtspTeardownRequestTimeout < 0) ? RTSP_TEARDOWN_REQUEST_TIMEOUT_DEFAULT : this->rtspTeardownRequestTimeout;
  this->openConnetionMaximumAttempts = (this->openConnetionMaximumAttempts < 0) ? RTSP_OPEN_CONNECTION_MAXIMUM_ATTEMPTS_DEFAULT : this->openConnetionMaximumAttempts;

  this->rtspScheduler = RtspTaskScheduler::createNew();
  this->rtspEnvironment = BasicUsageEnvironment::createNew(*this->rtspScheduler);

  result |= (this->rtspScheduler == NULL);
  result |= (this->rtspEnvironment == NULL);

  return (result == STATUS_OK) ? STATUS_OK : STATUS_ERROR;
}
开发者ID:BMOTech,项目名称:MediaPortal-1,代码行数:35,代码来源:MPIPTV_RTSP.cpp


示例4: GetDlgItem

void CWorkspacePreferencesDialog::OnOK()
{
#if 0
	if (GetFocus() == GetDlgItem(IDC_WORKSPACE_SIZE))
	{
		GetDlgItem(IDOK)->SetFocus();
	}

	else
#endif
	if (OnValidateWorkspaceSize(0, 0L))
	{
	/* Check that the number they typed is valid. */
		DWORD dwAvailableSize = Util::GetAvailableDiskSpace(m_csWorkspaceDirectory);

		dwAvailableSize += m_cache->get_physical_size();

		if (m_dwWorkspaceSize > dwAvailableSize)
		{
		/*
		// This is not a good idea.
		// Inform the user that a lower number is required.
		*/

			GetConfiguration()->MessageBox(IDS_ErrWorkspaceExceedsDiskSpace, 0,
													 MB_OK | MB_ICONEXCLAMATION);
			GetDlgItem(IDC_WORKSPACE_SIZE)->SetFocus();
		}
		else
		{
		/* Go home. */
			CPmwDialog::OnOK();
		}
	}
}
开发者ID:jimmccurdy,项目名称:ArchiveGit,代码行数:35,代码来源:WORKDLG.CPP


示例5: BuildFromURI

VSIOSSHandleHelper* VSIOSSHandleHelper::BuildFromURI( const char* pszURI,
                                                      const char* pszFSPrefix,
                                                      bool bAllowNoObject,
                                                      CSLConstList papszOptions )
{
    CPLString osSecretAccessKey;
    CPLString osAccessKeyId;
    if( !GetConfiguration(papszOptions, osSecretAccessKey, osAccessKeyId) )
    {
        return nullptr;
    }

    const CPLString osEndpoint = CSLFetchNameValueDef(papszOptions,
        "OSS_ENDPOINT",
        CPLGetConfigOption("OSS_ENDPOINT", "oss-us-east-1.aliyuncs.com"));
    CPLString osBucket;
    CPLString osObjectKey;
    if( pszURI != nullptr && pszURI[0] != '\0' &&
        !GetBucketAndObjectKey(pszURI, pszFSPrefix, bAllowNoObject,
                               osBucket, osObjectKey) )
    {
        return nullptr;
    }
    const bool bUseHTTPS = CPLTestBool(CPLGetConfigOption("OSS_HTTPS", "YES"));
    const bool bIsValidNameForVirtualHosting =
        osBucket.find('.') == std::string::npos;
    const bool bUseVirtualHosting = CPLTestBool(
        CPLGetConfigOption("OSS_VIRTUAL_HOSTING",
                           bIsValidNameForVirtualHosting ? "TRUE" : "FALSE"));
    return new VSIOSSHandleHelper(osSecretAccessKey, osAccessKeyId,
                                 osEndpoint,
                                 osBucket, osObjectKey, bUseHTTPS,
                                 bUseVirtualHosting);
}
开发者ID:OSGeo,项目名称:gdal,代码行数:34,代码来源:cpl_alibaba_oss.cpp


示例6: CHECK_LT

void VideoFormats::getProfileLevel(
        ResolutionType type, size_t index,
        ProfileType *profile, LevelType *level) const{
    CHECK_LT(type, kNumResolutionTypes);
    CHECK(GetConfiguration(type, index, NULL, NULL, NULL, NULL));

    int i, bestProfile = -1, bestLevel = -1;

    for (i = 0; i < kNumProfileTypes; ++i) {
        if (mConfigs[type][index].profile & (1ul << i)) {
            bestProfile = i;
        }
    }

    for (i = 0; i < kNumLevelTypes; ++i) {
        if (mConfigs[type][index].level & (1ul << i)) {
            bestLevel = i;
        }
    }

    if (bestProfile == -1 || bestLevel == -1) {
        ALOGE("Profile or level not set for resolution type %d, index %d",
              type, index);
        bestProfile = PROFILE_CBP;
        bestLevel = LEVEL_31;
    }

    *profile = (ProfileType) bestProfile;
    *level = (LevelType) bestLevel;
}
开发者ID:AOSP-Argon,项目名称:android_frameworks_av,代码行数:30,代码来源:VideoFormats.cpp


示例7: main

int main()
{
    const char *configuration = GetConfiguration();
    printf("Configuration is '%s'\n", configuration);

    return 0;
}
开发者ID:markfinal,项目名称:BuildAMation,代码行数:7,代码来源:main.c


示例8: set_card_panel_view

VOID CCardView::set_card_panel_view(SHORT new_panel)
{
/*
// If this is a demo card back, then we don't allow editing.
*/
   if ((new_panel == CARD_PANEL_Back) && !GetConfiguration()->SupportsCardBack())
   {
      return;
   }

#if 1
   BeforePageChange();
   SetPanel(new_panel);
#else
/*
// Get the document and build the undo/redo command for this.
*/

   CPmwDoc* pDoc = GetDocument();

   CCmdCardPanel* pCommand = new CCmdCardPanel(IDCmd_Panel[new_panel+1]);

   if (pCommand->Snapshot(this, pDoc->get_current_panel(), new_panel))
   {
      pDoc->AddCommand(pCommand);
   }
   else
   {
      delete pCommand;

   /* Fall through. */
//    SetPanel(new_panel);
   }
#endif
}
开发者ID:jimmccurdy,项目名称:ArchiveGit,代码行数:35,代码来源:CARDVIEW.CPP


示例9: IsBonusEnabled

REGRESULT CRegisterDLL::IsBonusEnabled(void)
{
#ifdef LOCALIZE
	if (GetConfiguration()->RemoveRegistration())
		return REGRESULT_AlreadyRegistered;
#endif
	return RegSendCommand(REGCOMMAND_IsBonusEnabled);
}
开发者ID:jimmccurdy,项目名称:ArchiveGit,代码行数:8,代码来源:REGISTER.CPP


示例10: RegisterBonus

REGRESULT CRegisterDLL::RegisterBonus(void)
{
#ifdef LOCALIZE
	if (GetConfiguration()->RemoveRegistration())
		return TRUE;
#endif
	return RegSendCommand(REGCOMMAND_Register " /C /A");
}
开发者ID:jimmccurdy,项目名称:ArchiveGit,代码行数:8,代码来源:REGISTER.CPP


示例11: GetConfiguration

status_t ArpAccentRandomizerFilter::Configure(ArpVectorI<BView*>& panels)
{
	BMessage config;
	status_t err = GetConfiguration(&config);
	if (err != B_OK) return err;
	panels.push_back(new ArpAccentRandomizerFilterSettings(mHolder, config));
	return B_OK;
}
开发者ID:HaikuArchives,项目名称:Sequitur,代码行数:8,代码来源:ArpAccentRandomizer.cpp


示例12: GetConfiguration

status_t ArpUncertainChorusFilter::Configure(ArpVectorI<BView*>& panels)
{
    BMessage config;
    status_t err = GetConfiguration(&config);
    if (err != B_OK) return err;
    panels.push_back(new ArpUncertainChorusSettings(mHolder, config));
    return B_OK;
}
开发者ID:dtbinh,项目名称:Sequitur,代码行数:8,代码来源:ArpUncertainChorus.cpp


示例13: GetConfiguration

status_t ArpControllerRangeFilter::Configure(ArpVectorI<BView*>& panels)
{
	BMessage config;
	status_t err = GetConfiguration(&config);
	if (err != B_OK) return err;
	panels.push_back(new _ControllerRangeSettings(mHolder, config));
	return B_OK;
}
开发者ID:tgkokk,项目名称:Sequitur,代码行数:8,代码来源:ArpControllerRange.cpp


示例14: GetConfiguration

int CAEN_V814::Config(BoardConfig *bC)
{
  Board::Config(bC);
  //Set All Configuration to 0
  for (unsigned int i=0;i<CAEN_V814_CHANNELS;++i)
    GetConfiguration()->chThreshold[i]=0;
  //here the parsing of the xmlnode...
  GetConfiguration()->baseAddress=Configurator::GetInt( bC->getElementContent("baseAddress"));
  GetConfiguration()->patternMask=Configurator::GetInt( bC->getElementContent("patternMask"));
  GetConfiguration()->outputWidth=Configurator::GetInt( bC->getElementContent("outputWidth"));
  GetConfiguration()->majorityThreshold=Configurator::GetInt( bC->getElementContent("majorityThreshold"));
  GetConfiguration()->commonThreshold=Configurator::GetInt( bC->getElementContent("commonThreshold"));


  //Now threshold per channel if they exist in configuration
  char chThresholdKey[100];
  for (unsigned int i=0;i<CAEN_V814_CHANNELS;++i)
    {
      sprintf(chThresholdKey,"ch%dThreshold",i);
      if (bC->getElementContent(chThresholdKey) == "NULL")
	continue;
      GetConfiguration()->chThreshold[i]==(int)Configurator::GetInt( bC->getElementContent(chThresholdKey) );
    }

  return 0;
}
开发者ID:cmsromadaq,项目名称:H4DAQ,代码行数:26,代码来源:CAEN_V814.cpp


示例15: CoreLoad

void CoreLoad()
{
  bool SessionList = false;
  std::unique_ptr<THierarchicalStorage> SessionsStorage(GetConfiguration()->CreateStorage(SessionList));
  THierarchicalStorage * ConfigStorage = nullptr;
  std::unique_ptr<THierarchicalStorage> ConfigStorageAuto;
  if (!SessionList)
  {
    // can reuse this for configuration
    ConfigStorage = SessionsStorage.get();
  }
  else
  {
    ConfigStorageAuto.reset(GetConfiguration()->CreateConfigStorage());
    ConfigStorage = ConfigStorageAuto.get();
  }

  assert(GetConfiguration() != nullptr);

  try
  {
    GetConfiguration()->Load(ConfigStorage);
  }
  catch (Exception & E)
  {
    ShowExtendedException(&E);
  }

  // should be noop, unless exception occurred above
  ConfigStorage->CloseAll();

  StoredSessions = new TStoredSessionList();

  try
  {
    if (SessionsStorage->OpenSubKey(GetConfiguration()->GetStoredSessionsSubKey(), false))
    {
      StoredSessions->Load(SessionsStorage.get());
    }
  }
  catch (Exception & E)
  {
    ShowExtendedException(&E);
  }
}
开发者ID:kocicjelena,项目名称:Far-NetBox,代码行数:45,代码来源:CoreMain.cpp


示例16: OnCancel

void CAddonProgressDialog::OnCancel()
{
	// make sure the user really wants to cancel the installation
	
	if (GetConfiguration()->MessageBox(IDS_ADDON_CONFIRM_ABORT, 0, MB_YESNO|MB_DEFBUTTON2|MB_ICONQUESTION) == IDYES)
	{
		m_fIsAborted = TRUE;
	}
}
开发者ID:jimmccurdy,项目名称:ArchiveGit,代码行数:9,代码来源:APROGRES.CPP


示例17: OpenWinSCPKey

static long OpenWinSCPKey(HKEY Key, const char * SubKey, HKEY * Result, bool CanCreate)
{
  long R;
  assert(GetConfiguration() != nullptr);

  assert(Key == HKEY_CURRENT_USER);
  USEDPARAM(Key);

  UnicodeString RegKey = SubKey;
  UnicodeString OriginalPuttyRegistryStorageKey(_T(PUTTY_REG_POS));
  intptr_t PuttyKeyLen = OriginalPuttyRegistryStorageKey.Length();
  assert(RegKey.SubString(1, PuttyKeyLen) == OriginalPuttyRegistryStorageKey);
  RegKey = RegKey.SubString(PuttyKeyLen + 1, RegKey.Length() - PuttyKeyLen);
  if (!RegKey.IsEmpty())
  {
    assert(RegKey[1] == L'\\');
    RegKey.Delete(1, 1);
  }

  if (RegKey.IsEmpty())
  {
    *Result = static_cast<HKEY>(nullptr);
    R = ERROR_SUCCESS;
  }
  else
  {
    // we expect this to be called only from verify_host_key() or store_host_key()
    assert(RegKey == L"SshHostKeys");

    std::unique_ptr<THierarchicalStorage> Storage(GetConfiguration()->CreateConfigStorage());
    Storage->SetAccessMode((CanCreate ? smReadWrite : smRead));
    if (Storage->OpenSubKey(RegKey, CanCreate))
    {
      *Result = reinterpret_cast<HKEY>(Storage.release());
      R = ERROR_SUCCESS;
    }
    else
    {
      R = ERROR_CANTOPEN;
    }
  }

  return R;
}
开发者ID:valery-barysok,项目名称:Far-NetBox,代码行数:44,代码来源:PuttyIntf.cpp


示例18: QuitRequested

bool SeqPrefWin::QuitRequested()
{
	if( !inherited::QuitRequested() ) return false;
	BMessage	config;
	if( GetConfiguration( &config ) == B_OK ) {
		if( seq_is_quitting() ) seq_app->AddShutdownMessage( "window_settings", &config );
		else seq_app->SetAuxiliaryWindowSettings(SeqApplication::PREF_WIN_INDEX, config);
	}
	return true;
}
开发者ID:dtbinh,项目名称:Sequitur,代码行数:10,代码来源:SeqPrefWin.cpp


示例19: QuitRequested

bool SeqPhrasePropertyWindow::QuitRequested()
{
	if (!inherited::QuitRequested() ) return false;
	BMessage	config;
	if (GetConfiguration(&config) == B_OK) {
		if (seq_is_quitting()) seq_app->AddShutdownMessage("window_settings", &config);
//		else seq_app->SetEditDeviceSettings(config);
	}
	return true;
}
开发者ID:tgkokk,项目名称:Sequitur,代码行数:10,代码来源:SeqPhrasePropertyWindow.cpp


示例20: DeleteConfiguration

void DeleteConfiguration()
{
  static bool ConfigurationDeleted = false;
  if (!ConfigurationDeleted)
  {
    TConfiguration * Conf = GetConfiguration();
    SAFE_DESTROY(Conf);
    ConfigurationDeleted = true;
  }
}
开发者ID:kocicjelena,项目名称:Far-NetBox,代码行数:10,代码来源:CoreMain.cpp



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ GetConnection函数代码示例发布时间:2022-05-30
下一篇:
C++ GetConfigValue函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap