Exemplo n.º 1
0
std::vector<std::string> TerminalState::GetCommands()
{
    std::vector<std::string> commands;
    m_commands.ProcessingObjects(Ref(this, &TerminalState::GetCommand, commands));
    return commands;
}
Exemplo n.º 2
0
void wxGenericPen::Create( const wxGenericPen &pen )
{
    Ref(pen);
}
Exemplo n.º 3
0
void wxGenericBrush::Create( const wxGenericBrush &brush )
{
    Ref(brush);
}
Exemplo n.º 4
0
RasterRect::RasterRect (Raster* r, Graphic* gr) : Graphic(gr) {
    _raster = r;
    Ref(_raster);
}
Exemplo n.º 5
0
 inline std::shared_ptr<Task> SpawnTaskFactory::Create() {
   return std::make_shared<SpawnTask>(m_taskFactory, m_trigger,
     Ref(*m_reactorMonitor));
 }
Exemplo n.º 6
0
void Message::addReference(RefSysType type, uint32_t value) {
  references.insert( Ref(type, value) );
}
Exemplo n.º 7
0
void ArrowInteractor::Reconfig () { 
    Painter* p = new Painter(output);
    Ref(p);
    Unref(output);
    output = p;
}
Exemplo n.º 8
0
	//--------------------------------------------------------------------------------
	long CTreeView::GetVisibleCount()
	{				
		_WINQ_FCONTEXT( "CTreeView::GetVisibleCount" );
		long lResult = m_Win32MsgHandler.Send( Ref(), (unsigned int) TVM_GETVISIBLECOUNT, 0, 0 );
		return lResult;
	}
Exemplo n.º 9
0
	//--------------------------------------------------------------------------------
	CImageList::refType CTreeView::SetImageList( int iList, CImageList::refType hImageList )
	{				
		_WINQ_FCONTEXT( "CTreeView::SetImageList" );
		CImageListHandle Handle( 0, (void*)( m_Win32MsgHandler.Send( Ref(), (unsigned int) TVM_SETIMAGELIST, static_cast< Cmp_uint_ptr >( iList ), reinterpret_cast< Cmp_long_ptr >( hImageList->Handle()->Use() ) ) ) );
		return CImageList::FromHandle( CImageListHandle::refType( &Handle, false ) );
	}
Exemplo n.º 10
0
wxPen& wxPen::operator = (const wxPen& pen)
{
    if (*this == pen) return (*this);
    Ref(pen);
    return *this;
}
Ref SateliteCam::GetRef()
{
	Point3D Y(0,1,0);
	Point3D Z(0,0,1);
	return Ref(m_Vehicle->MyRef.Position+Z*m_height,Z*(-1.f)+Y*.001f,m_Vehicle->MyRef.GetDirection());
}
Exemplo n.º 12
0
wxPen::wxPen(const wxPen& pen)
{
    Ref(pen);
}
Exemplo n.º 13
0
 inline std::shared_ptr<Task> UntilTaskFactory::Create() {
   return std::make_shared<UntilTask>(m_taskFactory, m_condition,
     Ref(*m_reactorMonitor));
 }
Exemplo n.º 14
0
void CId2Reader::x_InitConnection(CConn_IOStream& stream, TConn conn)
{
    // prepare init request
    CID2_Request req;
    req.SetRequest().SetInit();
    x_SetContextData(req);
    CID2_Request_Packet packet;
    packet.Set().push_back(Ref(&req));
    // that's it for now
    // TODO: add params

    // send init request
    {{
        if ( GetDebugLevel() >= eTraceConn ) {
            CDebugPrinter s(conn, "CId2Reader");
            s << "Sending";
            if ( GetDebugLevel() >= eTraceASN ) {
                s << ": " << MSerial_AsnText << packet;
            }
            else {
                s << " ID2-Request-Packet";
            }
            s << "...";
        }
        try {
            stream << MConnFormat << packet << flush;
        }
        catch ( CException& exc ) {
            NCBI_RETHROW(exc, CLoaderException, eConnectionFailed,
                         "failed to send init request: "+
                         x_ConnDescription(stream));
        }
        if ( GetDebugLevel() >= eTraceConn ) {
            CDebugPrinter s(conn, "CId2Reader");
            s << "Sent ID2-Request-Packet.";
        }
        if ( !stream ) {
            NCBI_THROW(CLoaderException, eConnectionFailed,
                       "failed to send init request: "+
                       x_ConnDescription(stream));
        }
    }}
    
    // receive init reply
    CID2_Reply reply;
    {{
        if ( GetDebugLevel() >= eTraceConn ) {
            CDebugPrinter s(conn, "CId2Reader");
            s << "Receiving ID2-Reply...";
        }
        stream >> MConnFormat >> reply;
        if ( GetDebugLevel() >= eTraceConn   ) {
            CDebugPrinter s(conn, "CId2Reader");
            s << "Received";
            if ( GetDebugLevel() >= eTraceASN ) {
                s << ": " << MSerial_AsnText << reply;
            }
            else {
                s << " ID2-Reply.";
            }
        }
        if ( !stream ) {
            NCBI_THROW(CLoaderException, eLoaderFailed,
                       "failed to receive init reply: "+
                       x_ConnDescription(stream));
        }
    }}

    // check init reply
    if ( reply.IsSetDiscard() ) {
        NCBI_THROW(CLoaderException, eLoaderFailed,
                   "bad init reply: 'discard' is set: "+
                   x_ConnDescription(stream));
    }
    if ( reply.IsSetError() ) {
        NCBI_THROW(CLoaderException, eLoaderFailed,
                   "bad init reply: 'error' is set: "+
                   x_ConnDescription(stream));
    }
    if ( !reply.IsSetEnd_of_reply() ) {
        NCBI_THROW(CLoaderException, eLoaderFailed,
                   "bad init reply: 'end-of-reply' is not set: "+
                   x_ConnDescription(stream));
    }
    if ( reply.GetReply().Which() != CID2_Reply::TReply::e_Init ) {
        NCBI_THROW(CLoaderException, eLoaderFailed,
                   "bad init reply: 'reply' is not 'init': "+
                   x_ConnDescription(stream));
    }
    // that's it for now
    // TODO: process params
}
Exemplo n.º 15
0
JObject::JObject(const JObject& other) {
  _obj_val = other._obj_val;
  _unref_at_close = true;
  Ref();
}
Exemplo n.º 16
0
	//--------------------------------------------------------------------------------
	void CTreeView::SetIndent( int iIndent )
	{				
		_WINQ_FCONTEXT( "CTreeView::SetIndent" );
		m_Win32MsgHandler.Send( Ref(), (unsigned int) TVM_SETINDENT, 
			static_cast< Cmp_uint_ptr >( iIndent ), 0 );
	}
Exemplo n.º 17
0
// drwxrwsr-x   2 root     root         4096 Mar 26  2011 w32api
class CTestFileInfo: public CCppObject
{
public:
	CTestFileInfo():
	  	faccess(),
		fcnt(0),
		fuser(),
		fgroup(),
		fsize(0L),
		fname(),
		fLoadedAndCurrent(false)
	{
	}

	void Parse(Ref(CStringConstIterator) it )
	{
		word mon, day, year, hour = 0, min = 0;
		CPointer pValue;
		WULong sValue;
		WLong nValue;

		it.EatWord(pValue, sValue);
		faccess.SetString(__FILE__LINE__ pValue, sValue);
		it.EatWhite();
		it.EatDecimal(nValue);
		fcnt = Cast(word, nValue);
		it.EatWhite();
		it.EatWord(pValue, sValue);
		fuser.SetString(__FILE__LINE__ pValue, sValue);
		it.EatWhite();
Exemplo n.º 18
0
	//--------------------------------------------------------------------------------
	COSWindow::refType CTreeView::SetToolTips( COSWindow::refType hToolTips )
	{				
		_WINQ_FCONTEXT( "CTreeView::SetToolTips" );
		CWindowHandle Handle( 0, (void*)( m_Win32MsgHandler.Send( Ref(), (unsigned int) TVM_SETTOOLTIPS, reinterpret_cast< Cmp_uint_ptr >( hToolTips->Handle()->Use() ), 0 ) ) );
		return COSWindow::FromHandle( CWindowHandle::refType( &Handle, false ) );
	}
Exemplo n.º 19
0
void ArrowInteractor::SetBrush (PSBrush* b) {
    Ref(b);
    Unref(_brush);
    _brush = b; 
}
Exemplo n.º 20
0
	//--------------------------------------------------------------------------------
	COSWindow::refType CTreeView::EditLabel( HTREEITEM hItem )
	{				
		_WINQ_FCONTEXT( "CTreeView::EditLabel" );
		CWindowHandle Handle( 0, (void*)( m_Win32MsgHandler.Send( Ref(), (unsigned int) TVM_EDITLABEL, 0, reinterpret_cast< Cmp_long_ptr >( hItem ) ) ) );
		return COSWindow::FromHandle( CWindowHandle::refType( &Handle, false ) );
	}
Exemplo n.º 21
0
D_Typeface::Ref D_Typeface::New(const pkg::AssetRef &asset) {
	return Ref(new (ZWorld) D_Typeface(asset));
}
Exemplo n.º 22
0
	//--------------------------------------------------------------------------------
	COSWindow::refType CTreeView::GetEditControl()
	{				
		_WINQ_FCONTEXT( "CTreeView::GetEditControl" );
		CWindowHandle Handle( 0, (void*)( m_Win32MsgHandler.Send( Ref(), (unsigned int) TVM_GETEDITCONTROL, 0, 0 ) ) );
		return COSWindow::FromHandle( CWindowHandle::refType( &Handle, false ) );
	}
Exemplo n.º 23
0
#include "platform.h"

C_Errno_t(C_Int_t) Posix_Process_nanosleep (Ref(C_Time_t) sec, Ref(C_Long_t) nsec) {
  struct timespec rem;
  struct timespec req;
  int res;

  req.tv_sec = *((time_t*)sec);
  req.tv_nsec =*((long*)nsec);
  rem.tv_sec = 0;
  rem.tv_nsec = 0;
  res = nanosleep (&req, &rem);
  *((time_t*)sec) = rem.tv_sec;
  *((long*)nsec) = rem.tv_nsec;
  return res;
}
Exemplo n.º 24
0
	//--------------------------------------------------------------------------------
	CImageList::refType CTreeView::GetImageList( int iImageList )
	{				
		_WINQ_FCONTEXT( "CTreeView::GetImageList" );
		CImageListHandle Handle( 0, (void*)( m_Win32MsgHandler.Send( Ref(), (unsigned int) TVM_GETIMAGELIST, static_cast< Cmp_uint_ptr >( iImageList ), 0 ) ) );
		return CImageList::FromHandle( CImageListHandle::refType( &Handle, false ) );
	}
Exemplo n.º 25
0
TEST(Basic, ZeroInit) {
  // 배열-포인터 변환(데이터형 decay)는 파라미터가 참조자가 아닐 경우에만 일어난다.
  EXPECT_STREQ("char const [6]", Ref("hello"));
  EXPECT_STREQ("char const *", NonRef("hello"));
}
Exemplo n.º 26
0
	//--------------------------------------------------------------------------------
	long CTreeView::GetIndent()
	{				
		_WINQ_FCONTEXT( "CTreeView::GetIndent" );
		long lResult = m_Win32MsgHandler.Send( Ref(), (unsigned int) TVM_GETINDENT, 0, 0 );
		return lResult;
	}
Exemplo n.º 27
0
void wxGenericColour::Create( const wxGenericColour& c )
{
    Ref(c);
}
Exemplo n.º 28
0
		else
			_command.SetString(__FILE__LINE__ CastAny(CConstPointer, pzTail));

		_siNumResultColumns = sqlite3_column_count(_lpStmt);
		if (_siNumResultColumns > 0)
			return;

		res = sqlite3_step(_lpStmt);

		if (res != SQLITE_DONE)
			HandleError(__FILE__LINE__ res, _T("sqlite3_step"));
		pzTail = pzTail1;
	}
}

void CSqLite3StatementImpl::BindColumns(Ref(CSqLite3Statement::CSqLite3Columns) cols)
{
	if ((!_lpEnv) || (!_lpConn) || (!_lpStmt) || (_siNumResultColumns <= 0))
	{
		Ptr(CSqLite3Exception) pEx = OK_NEW_OPERATOR CSqLite3Exception(__FILE__LINE__ _T("[CSqLite3StatementImpl::BindColumns] Invalid arguments or programming sequence error"));

		if (_lpEnv)
			_lpEnv->set_LastError(pEx);
		throw pEx;
	}

	sword iCol;

	for (iCol = 0; iCol < _siNumResultColumns; ++iCol)
	{
#ifdef UNICODE
Exemplo n.º 29
0
 void _ref() { Ref(); }
Exemplo n.º 30
0
void TerminalState::Execute(const std::string& command, const std::vector<std::string>& args)
{
    std::vector<std::string> args_;
    CommandChecker commandChecker{command, args, false, args_};
    m_commands.ProcessingObjects(Ref(this, &TerminalState::ExecuteCommand, commandChecker));
}