本文整理汇总了C++中Status::Get_Code方法的典型用法代码示例。如果您正苦于以下问题:C++ Status::Get_Code方法的具体用法?C++ Status::Get_Code怎么用?C++ Status::Get_Code使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Status
的用法示例。
在下文中一共展示了Status::Get_Code方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Create
MapServiceConnector::ptr_t MapServiceConnectorFactory::Create( const std::string& config_pathname,
Status& status )
{
// Log Entry
BOOST_LOG_TRIVIAL(trace) << "MapServiceConnector::" << __func__ << ", Start of Method";
// Load the Configuration
Configuration options = ConfigParser(config_pathname).Load_Configuration(status);
// Check if Initialized
if( Is_Initialized() == false ){
status = Initialize( options );
if( status.Get_Code() != StatusCode::SUCCESS ){
return nullptr;
}
}
// Check the status
if( status.Get_Code() != StatusCode::SUCCESS ){
return nullptr;
}
// Load and return the new connector
MapServiceConnector::ptr_t connector = std::make_shared<MapServiceConnector>( options );
// Log Entry
BOOST_LOG_TRIVIAL(trace) << "MapServiceConnector::" << __func__ << ", End of Method";
// Return Success
status = Status( StatusCode::SUCCESS );
return connector;
}
示例2: Create
Base_Connector::ptr_t Connection_Generator_Factory::Create( const Configuration& configuration,
Status& status )
{
// Log Entry
std::string m_class_name = "Connection_Generator_Factory";
BOOST_LOG_TRIVIAL(trace) << CLASS_LOG << ", Start of Method.";
// Get the name
std::string name = configuration.Get_Value("connector","",status );
// Get instance
gen_ptr instance = Get_Instance(status);
if( status.Get_Code() != StatusCode::SUCCESS ){
return nullptr;
}
// Check if name exists
if( instance->m_generator_map.find(name) ==
instance->m_generator_map.end() )
{
status = Status( StatusCode::NO_CONNECTOR_FOUND,
"No Connection Generator Found.");
return nullptr;
}
// Return the result
return instance->m_generator_map.find(name)->second->Create( configuration, status );
}