本文整理汇总了C++中ACELIB_ERROR函数的典型用法代码示例。如果您正苦于以下问题:C++ ACELIB_ERROR函数的具体用法?C++ ACELIB_ERROR怎么用?C++ ACELIB_ERROR使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了ACELIB_ERROR函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: base_type
ACE_Strategy_Connector<SVC_HANDLER, ACE_PEER_CONNECTOR_2>::ACE_Strategy_Connector
(ACE_Reactor *reactor,
ACE_Creation_Strategy<SVC_HANDLER> *cre_s,
ACE_Connect_Strategy<SVC_HANDLER, ACE_PEER_CONNECTOR_2> *conn_s,
ACE_Concurrency_Strategy<SVC_HANDLER> *con_s,
int flags)
: base_type (reactor),
creation_strategy_ (0),
delete_creation_strategy_ (false),
connect_strategy_ (0),
delete_connect_strategy_ (false),
concurrency_strategy_ (0),
delete_concurrency_strategy_ (false)
{
ACE_TRACE ("ACE_Connector<SVC_HANDLER, ACE_PEER_CONNECTOR_2>::ACE_Strategy_Connector");
if (this->open (reactor, cre_s, conn_s, con_s, flags) == -1)
ACELIB_ERROR ((LM_ERROR, ACE_TEXT ("%p\n"), ACE_TEXT ("ACE_Strategy_Connector::ACE_Strategy_Connector")));
}
开发者ID:manut,项目名称:ACE,代码行数:19,代码来源:Connector.cpp
示例2: completion_port_
ACE_WIN32_Proactor::ACE_WIN32_Proactor (size_t number_of_threads,
bool used_with_reactor_event_loop)
: completion_port_ (0),
// This *MUST* be 0, *NOT* ACE_INVALID_HANDLE !!!
number_of_threads_ (static_cast<DWORD> (number_of_threads)),
used_with_reactor_event_loop_ (used_with_reactor_event_loop)
{
// Create the completion port.
this->completion_port_ = ::CreateIoCompletionPort (INVALID_HANDLE_VALUE,
0,
0,
this->number_of_threads_);
if (this->completion_port_ == 0)
ACELIB_ERROR ((LM_ERROR,
ACE_TEXT ("%p\n"),
ACE_TEXT ("CreateIoCompletionPort")));
this->get_asynch_pseudo_task ().start ();
}
开发者ID:Arkania,项目名称:ArkCORE-NG,代码行数:19,代码来源:WIN32_Proactor.cpp
示例3: open_mode_
ACE_DLL::ACE_DLL (const ACE_DLL &rhs)
: open_mode_ (0),
dll_name_ (0),
close_handle_on_destruction_ (false),
dll_handle_ (0),
error_ (0)
{
ACE_TRACE ("ACE_DLL::ACE_DLL (const ACE_DLL &)");
if (rhs.dll_name_
// This will automatically up the refcount.
&& this->open (rhs.dll_name_,
rhs.open_mode_,
rhs.close_handle_on_destruction_) != 0
&& ACE::debug ())
ACELIB_ERROR ((LM_ERROR,
ACE_TEXT ("ACE_DLL::copy_ctor: error: %s\n"),
this->error ()));
}
开发者ID:binary42,项目名称:OCI,代码行数:19,代码来源:DLL.cpp
示例4: ACE_TEXT
void
Linux_Network_Interface_Monitor::init (void)
{
for (unsigned long i = 0UL; i < MAX_INTERFACES; ++i)
{
this->value_array_[i] = 0UL;
}
/// Read the file once to get a base value that we can subtract
/// from subsequent readings to get bytes sent since we started
/// monitoring.
char buf[1024];
FILE* fp = ACE_OS::fopen (ACE_TEXT ("/proc/net/dev"),
ACE_TEXT ("r"));
if (fp == 0)
{
ACELIB_ERROR ((LM_ERROR,
ACE_TEXT ("bytes sent - opening ")
ACE_TEXT ("/proc/net/dev failed\n")));
return;
}
/// Ignore the first 2 lines of the file, which are file
/// and column headers.
void* dummy = ACE_OS::fgets (buf, sizeof (buf), fp);
ACE_UNUSED_ARG (dummy);
dummy = ACE_OS::fgets (buf, sizeof (buf), fp);
ACE_UNUSED_ARG (dummy);
unsigned long iface_value = 0UL;
ACE_UINT32 iface_index = 0UL;
while (ACE_OS::fgets (buf, sizeof (buf), fp) != 0)
{
sscanf (buf, this->scan_format_.c_str (), &iface_value);
this->start_ += iface_value;
++iface_index;
}
(void) ACE_OS::fclose (fp);
}
开发者ID:binary42,项目名称:OCI,代码行数:43,代码来源:Linux_Network_Interface_Monitor.cpp
示例5: ssl_
ACE_SSL_SOCK_Stream::ACE_SSL_SOCK_Stream (ACE_SSL_Context *context)
: ssl_ (0),
stream_ ()
{
ACE_TRACE ("ACE_SSL_SOCK_Stream::ACE_SSL_SOCK_Stream");
ACE_SSL_Context * ctx =
(context == 0 ? ACE_SSL_Context::instance () : context);
this->ssl_ = ::SSL_new (ctx->context ());
if (this->ssl_ == 0)
{
ACELIB_ERROR ((LM_ERROR,
"(%P|%t) ACE_SSL_SOCK_Stream "
"- cannot allocate new SSL structure %p\n",
ACE_TEXT ("")));
}
}
开发者ID:CCJY,项目名称:ACE,代码行数:19,代码来源:SSL_SOCK_Stream.cpp
示例6: ACE_Event_Handler
ACE_Process_Manager::ACE_Process_Manager (size_t size,
ACE_Reactor *r)
: ACE_Event_Handler (),
process_table_ (0),
max_process_table_size_ (0),
current_count_ (0),
default_exit_handler_ (0)
#if defined (ACE_HAS_THREADS)
, lock_ ()
#endif /* ACE_HAS_THREADS */
{
ACE_TRACE ("ACE_Process_Manager::ACE_Process_Manager");
if (this->open (size, r) == -1)
{
ACELIB_ERROR ((LM_ERROR,
ACE_TEXT ("%p\n"),
ACE_TEXT ("ACE_Process_Manager")));
}
}
开发者ID:CCJY,项目名称:ACE,代码行数:20,代码来源:Process_Manager.cpp
示例7: ACELIB_ERROR
ACE_SOCK::ACE_SOCK (int type,
int protocol_family,
int protocol,
ACE_Protocol_Info *protocolinfo,
ACE_SOCK_GROUP g,
u_long flags,
int reuse_addr)
{
// ACE_TRACE ("ACE_SOCK::ACE_SOCK");
if (this->open (type,
protocol_family,
protocol,
protocolinfo,
g,
flags,
reuse_addr) == -1)
ACELIB_ERROR ((LM_ERROR,
ACE_TEXT ("%p\n"),
ACE_TEXT ("ACE_SOCK::ACE_SOCK")));
}
开发者ID:Adeer,项目名称:OregonCore,代码行数:20,代码来源:SOCK.cpp
示例8: ACE_Event_Base
ACE_Event_T<TIME_POLICY>::ACE_Event_T (int manual_reset,
int initial_state,
int type,
const ACE_TCHAR *name,
void *arg,
LPSECURITY_ATTRIBUTES sa)
: ACE_Event_Base ()
{
ACE_Condition_Attributes_T<TIME_POLICY> cond_attr (type);
if (ACE_OS::event_init (&this->handle_,
type,
&const_cast<ACE_condattr_t&> (cond_attr.attributes ()),
manual_reset,
initial_state,
name,
arg,
sa) != 0)
ACELIB_ERROR ((LM_ERROR,
ACE_TEXT ("%p\n"),
ACE_TEXT ("ACE_Event_T<TIME_POLICY>::ACE_Event_T")));
}
开发者ID:DOCGroup,项目名称:ACE_TAO,代码行数:21,代码来源:Event.cpp
示例9: ACE_TRACE
void
ACE_Token_Proxy_Queue::dequeue (void)
{
ACE_TRACE ("ACE_Token_Proxy_Queue::dequeue");
if (head_ == 0)
return;
ACE_TPQ_Entry *temp = this->head_;
this->head_ = this->head_->next_;
temp->next_ = 0;
--this->size_;
if (this->head_ == 0 && this->size_ != 0)
ACELIB_ERROR ((LM_ERROR,
ACE_TEXT ("incorrect size = %d\n"),
this->size_));
}
开发者ID:Arkania,项目名称:ArkCORE-NG,代码行数:21,代码来源:Local_Tokens.cpp
示例10: shmem_
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
ACE_System_Time::ACE_System_Time (const ACE_TCHAR *poolname)
: shmem_ (0)
, delta_time_ (0)
{
ACE_TRACE ("ACE_System_Time::ACE_System_Time");
// Only create a new unique filename for the memory pool file
// if the user didn't supply one...
if (poolname == 0)
{
#if defined (ACE_DEFAULT_BACKING_STORE)
// Create a temporary file.
ACE_OS::strcpy (this->poolname_,
ACE_DEFAULT_BACKING_STORE);
#else /* ACE_DEFAULT_BACKING_STORE */
if (ACE::get_temp_dir (this->poolname_,
MAXPATHLEN - 17) == -1)
// -17 for ace-malloc-XXXXXX
{
ACELIB_ERROR ((LM_ERROR,
ACE_TEXT ("Temporary path too long, ")
ACE_TEXT ("defaulting to current directory\n")));
this->poolname_[0] = 0;
}
// Add the filename to the end
ACE_OS::strcat (this->poolname_, ACE_TEXT ("ace-malloc-XXXXXX"));
#endif /* ACE_DEFAULT_BACKING_STORE */
}
else
ACE_OS::strsncpy (this->poolname_,
poolname,
(sizeof this->poolname_ / sizeof (ACE_TCHAR)));
ACE_NEW (this->shmem_,
ALLOCATOR (this->poolname_));
}
开发者ID:Adeer,项目名称:OregonCore,代码行数:40,代码来源:System_Time.cpp
示例11: switch
ACE_Service_Type_Impl *
ACE_Service_Config::create_service_type_impl (const ACE_TCHAR *name,
int type,
void *symbol,
u_int flags,
ACE_Service_Object_Exterminator gobbler)
{
ACE_Service_Type_Impl *stp = 0;
// Note, the only place we need to put a case statement. This is
// also the place where we'd put the RTTI tests, if the compiler
// actually supported them!
switch (type)
{
case ACE_Service_Type::SERVICE_OBJECT:
ACE_NEW_RETURN (stp,
ACE_Service_Object_Type ((ACE_Service_Object *) symbol,
name, flags,
gobbler),
0);
break;
case ACE_Service_Type::MODULE:
ACE_NEW_RETURN (stp,
ACE_Module_Type (symbol, name, flags),
0);
break;
case ACE_Service_Type::STREAM:
ACE_NEW_RETURN (stp,
ACE_Stream_Type (symbol, name, flags),
0);
break;
default:
ACELIB_ERROR ((LM_ERROR,
ACE_TEXT ("unknown case\n")));
break;
}
return stp;
}
开发者ID:CCJY,项目名称:ACE,代码行数:40,代码来源:Service_Config.cpp
示例12: ACE_TEXT
void
CPU_Load_Monitor::access_proc_stat (unsigned long *which_idle)
{
this->file_ptr_ = ACE_OS::fopen (ACE_TEXT ("/proc/stat"),
ACE_TEXT ("r"));
if (this->file_ptr_ == 0)
{
ACELIB_ERROR ((LM_ERROR,
ACE_TEXT ("CPU load - opening /proc/stat failed\n")));
return;
}
char *item = 0;
char *arg = 0;
while ((ACE_OS::fgets (buf_, sizeof (buf_), file_ptr_)) != 0)
{
item = ACE_OS::strtok (this->buf_, " \t\n");
arg = ACE_OS::strtok (0, "\n");
if (item == 0 || arg == 0)
{
continue;
}
if (ACE_OS::strcmp (item, "cpu") == 0)
{
sscanf (arg,
"%lu %lu %lu %lu",
&this->user_,
&this->wait_,
&this->kernel_,
which_idle);
break;
}
}
ACE_OS::fclose (this->file_ptr_);
}
开发者ID:DOCGroup,项目名称:ACE_TAO,代码行数:40,代码来源:CPU_Load_Monitor.cpp
示例13: ACE_TRACE
// Trigger reconfiguration to re-read configuration files.
void
ACE_Service_Config::reconfigure (void)
{
ACE_TRACE ("ACE_Service_Config::reconfigure");
ACE_Service_Config::reconfig_occurred_ = 0;
if (ACE::debug ())
{
#if !defined (ACE_NLOGGING)
time_t t = ACE_OS::time (0);
#endif /* ! ACE_NLOGGING */
if (ACE::debug ())
ACELIB_DEBUG ((LM_DEBUG,
ACE_TEXT ("beginning reconfiguration at %s"),
ACE_OS::ctime (&t)));
}
if (ACE_Service_Config::process_directives () == -1)
ACELIB_ERROR ((LM_ERROR,
ACE_TEXT ("%p\n"),
ACE_TEXT ("process_directives")));
}
开发者ID:CCJY,项目名称:ACE,代码行数:23,代码来源:Service_Config.cpp
示例14: ACE_TRACE
ACE_SOCK_Acceptor::ACE_SOCK_Acceptor (const ACE_Addr &local_sap,
ACE_Protocol_Info *protocolinfo,
ACE_SOCK_GROUP g,
u_long flags,
int reuse_addr,
int protocol_family,
int backlog,
int protocol)
{
ACE_TRACE ("ACE_SOCK_Acceptor::ACE_SOCK_Acceptor");
if (this->open (local_sap,
protocolinfo,
g,
flags,
reuse_addr,
protocol_family,
backlog,
protocol) == -1)
ACELIB_ERROR ((LM_ERROR,
ACE_TEXT ("%p\n"),
ACE_TEXT ("ACE_SOCK_Acceptor")));
}
开发者ID:CCJY,项目名称:ACE,代码行数:22,代码来源:SOCK_Acceptor.cpp
示例15: ACELIB_ERROR
int
ACE_Proactor::close (void)
{
// Close the implementation.
if (this->implementation ()->close () == -1)
ACELIB_ERROR ((LM_ERROR,
ACE_TEXT ("%N:%l:(%P | %t):%p\n"),
ACE_TEXT ("ACE_Proactor::close: implementation close")));
// Delete the implementation.
if (this->delete_implementation_)
{
delete this->implementation ();
this->implementation_ = 0;
}
// Delete the timer handler.
if (this->timer_handler_)
{
delete this->timer_handler_;
this->timer_handler_ = 0;
}
// Delete the timer queue.
if (this->delete_timer_queue_)
{
delete this->timer_queue_;
this->timer_queue_ = 0;
this->delete_timer_queue_ = 0;
}
else if (this->timer_queue_)
{
this->timer_queue_->close ();
this->timer_queue_ = 0;
}
return 0;
}
开发者ID:GlassFace,项目名称:sunwell,代码行数:38,代码来源:Proactor.cpp
示例16: ACE_TRACE
void *
ACE_DLL_Handle::symbol (const ACE_TCHAR *sym_name, bool ignore_errors, ACE_TString &error)
{
ACE_TRACE ("ACE_DLL_Handle::symbol");
ACE_MT (ACE_GUARD_RETURN (ACE_Thread_Mutex, ace_mon, this->lock_, 0));
ACE_Auto_Array_Ptr <ACE_TCHAR> auto_name (ACE::ldname (sym_name));
// handle_ can be invalid especially when ACE_DLL_Handle resigned ownership
// BTW. Handle lifecycle management is a little crazy in ACE
if (this->handle_ != ACE_SHLIB_INVALID_HANDLE)
{
#if defined (ACE_OPENVMS)
void *sym = ACE::ldsymbol (this->handle_, auto_name.get ());
#else
void *sym = ACE_OS::dlsym (this->handle_, auto_name.get ());
#endif
// Linux says that the symbol could be null and that it isn't an
// error. So you should check the error message also, but since
// null symbols won't do us much good anyway, let's still report
// an error.
if (!sym && !ignore_errors)
{
this->error (error);
if (ACE::debug ())
ACELIB_ERROR ((LM_ERROR,
ACE_TEXT ("ACE (%P|%t) DLL_Handle::symbol (\"%s\") ")
ACE_TEXT (" failed with \"%s\".\n"),
auto_name.get (),
error.c_str ()));
return 0;
}
return sym;
}
return 0;
}
开发者ID:INMarkus,项目名称:ATCD,代码行数:38,代码来源:DLL_Manager.cpp
示例17: creation_strategy_
ACE_Strategy_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::ACE_Strategy_Acceptor
(const ACE_PEER_ACCEPTOR_ADDR &addr,
ACE_Reactor *reactor,
ACE_Creation_Strategy<SVC_HANDLER> *cre_s,
ACE_Accept_Strategy<SVC_HANDLER, ACE_PEER_ACCEPTOR_2> *acc_s,
ACE_Concurrency_Strategy<SVC_HANDLER> *con_s,
ACE_Scheduling_Strategy<SVC_HANDLER> *sch_s,
const ACE_TCHAR service_name[],
const ACE_TCHAR service_description[],
int use_select,
int reuse_addr)
: creation_strategy_ (0),
delete_creation_strategy_ (false),
accept_strategy_ (0),
delete_accept_strategy_ (false),
concurrency_strategy_ (0),
delete_concurrency_strategy_ (false),
scheduling_strategy_ (0),
delete_scheduling_strategy_ (false),
service_name_ (0),
service_description_ (0)
{
ACE_TRACE ("ACE_Strategy_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::ACE_Strategy_Acceptor");
if (this->open (addr,
reactor,
cre_s,
acc_s,
con_s,
sch_s,
service_name,
service_description,
use_select,
reuse_addr) == -1)
ACELIB_ERROR ((LM_ERROR,
ACE_TEXT ("%p\n"),
ACE_TEXT ("ACE_Strategy_Acceptor::ACE_Strategy_Acceptor")));
}
开发者ID:manut,项目名称:ACE,代码行数:38,代码来源:Acceptor.cpp
示例18: ext_handler_
// ************************************************************
// ACE_SSL_Asynch_Stream Constructor / Destructor
// ************************************************************
ACE_SSL_Asynch_Stream::ACE_SSL_Asynch_Stream (
ACE_SSL_Asynch_Stream::Stream_Type s_type,
ACE_SSL_Context * context)
: type_ (s_type),
proactor_ (0),
ext_handler_ (0),
ext_read_result_ (0),
ext_write_result_(0),
flags_ (0),
ssl_ (0),
handshake_complete_(false),
bio_ (0),
bio_istream_ (),
bio_inp_msg_ (),
bio_inp_errno_(0),
bio_inp_flag_ (0),
bio_ostream_ (),
bio_out_msg_ (),
bio_out_errno_(0),
bio_out_flag_ (0),
mutex_ ()
{
ACE_TRACE ("ACE_SSL_Asynch_Stream::ACE_SSL_Asynch_Stream");
// was honestly copied from ACE_SSL_SOCK_Stream :)
ACE_SSL_Context * ctx =
(context == 0 ? ACE_SSL_Context::instance () : context);
this->ssl_ = ::SSL_new (ctx->context ());
if (this->ssl_ == 0)
ACELIB_ERROR
((LM_ERROR,
ACE_TEXT ("(%P|%t) ACE_SSL_Asynch_Stream %p\n"),
ACE_TEXT ("- cannot allocate new SSL structure")
));
}
开发者ID:binary42,项目名称:OCI,代码行数:41,代码来源:SSL_Asynch_Stream.cpp
示例19: defined
int
ACE_FILE_Addr::set (const ACE_FILE_Addr &sa)
{
if (sa.get_type () == AF_ANY)
{
#if defined (ACE_DEFAULT_TEMP_FILE)
// Create a temporary file.
ACE_OS::strcpy (this->filename_,
ACE_DEFAULT_TEMP_FILE);
#else /* ACE_DEFAULT_TEMP_FILE */
if (ACE::get_temp_dir (this->filename_, MAXPATHLEN - 15) == -1)
// -15 for ace-file-XXXXXX
{
ACELIB_ERROR ((LM_ERROR,
ACE_TEXT ("Temporary path too long, ")
ACE_TEXT ("defaulting to current directory\n")));
this->filename_[0] = 0;
}
// Add the filename to the end
ACE_OS::strcat (this->filename_, ACE_TEXT ("ace-fileXXXXXX"));
#endif /* ACE_DEFAULT_TEMP_FILE */
if (ACE_OS::mktemp (this->filename_) == 0)
return -1;
this->base_set (AF_FILE,
static_cast<int> (ACE_OS::strlen (this->filename_) + 1));
}
else
{
(void)ACE_OS::strsncpy (this->filename_, sa.filename_, sa.get_size ());
this->base_set (sa.get_type (), sa.get_size ());
}
return 0;
}
开发者ID:AtVirus,项目名称:SkyFireEMU,代码行数:37,代码来源:FILE_Addr.cpp
示例20: thread_priority_mask_
My_ACE_Logging_Strategy::My_ACE_Logging_Strategy (void)
: thread_priority_mask_ (0),
process_priority_mask_ (0),
flags_ (0),
filename_ (0),
logger_key_ (0),
program_name_ (0),
wipeout_logfile_ (false),
fixed_number_ (false),
order_files_ (false),
count_ (0),
max_file_number_ (1), // 2 files by default (max file number + 1)
interval_ (ACE_DEFAULT_LOGFILE_POLL_INTERVAL),
max_size_ (0),
log_msg_ (ACE_Log_Msg::instance ())
{
#if defined (ACE_DEFAULT_LOGFILE)
this->filename_ = ACE::strnew (ACE_DEFAULT_LOGFILE);
#else /* ACE_DEFAULT_LOGFILE */
ACE_NEW (this->filename_,
ACE_TCHAR[MAXPATHLEN + 1]);
// Get the temporary directory
if (ACE::get_temp_dir
(this->filename_,
MAXPATHLEN - 7) == -1) // 7 for "logfile"
{
ACELIB_ERROR ((LM_ERROR,
ACE_TEXT ("Temporary path too long, ")
ACE_TEXT ("defaulting to current directory\n")));
this->filename_[0] = 0;
}
// Add the filename to the end
ACE_OS::snprintf(this->filename_, MAXPATHLEN, "%s%s", this->filename_, ACE_TEXT("logfile"));
#endif /* ACE_DEFAULT_LOGFILE */
}
开发者ID:freeeyes,项目名称:PSS,代码行数:37,代码来源:MyACELoggingStrategy.cpp
注:本文中的ACELIB_ERROR函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论