Class: CP2DataBuffer

Inherits:
Base
  • Object
show all
Includes:
WIN32OLE::VARIANT
Defined in:
lib/ole20110223-013209.rb

Overview

P2DataBuffer Class

Constant Summary collapse

CLSID =

P2ClientGate_P2DataBuffer_1

'{30E32F86-2B2A-47E4-A3B9-FDA18197E6E0}'
PROGID =
'P2ClientGate.P2DataBuffer.1'

Constants included from WIN32OLE::VARIANT

WIN32OLE::VARIANT::VT_ARRAY, WIN32OLE::VARIANT::VT_BOOL, WIN32OLE::VARIANT::VT_BSTR, WIN32OLE::VARIANT::VT_BYREF, WIN32OLE::VARIANT::VT_CY, WIN32OLE::VARIANT::VT_DATE, WIN32OLE::VARIANT::VT_DISPATCH, WIN32OLE::VARIANT::VT_EMPTY, WIN32OLE::VARIANT::VT_ERROR, WIN32OLE::VARIANT::VT_I1, WIN32OLE::VARIANT::VT_I2, WIN32OLE::VARIANT::VT_I4, WIN32OLE::VARIANT::VT_I8, WIN32OLE::VARIANT::VT_INT, WIN32OLE::VARIANT::VT_NULL, WIN32OLE::VARIANT::VT_PTR, WIN32OLE::VARIANT::VT_R4, WIN32OLE::VARIANT::VT_R8, WIN32OLE::VARIANT::VT_UI1, WIN32OLE::VARIANT::VT_UI2, WIN32OLE::VARIANT::VT_UI4, WIN32OLE::VARIANT::VT_UI8, WIN32OLE::VARIANT::VT_UINT, WIN32OLE::VARIANT::VT_UNKNOWN, WIN32OLE::VARIANT::VT_USERDEFINED, WIN32OLE::VARIANT::VT_VARIANT

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(opts = {}) ⇒ CP2DataBuffer

Returns a new instance of CP2DataBuffer.



1279
1280
1281
# File 'lib/ole20110223-013209.rb', line 1279

def initialize opts = {}
  super PROGID, opts
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(cmd, *args) ⇒ Object



1283
1284
1285
# File 'lib/ole20110223-013209.rb', line 1283

def method_missing(cmd, *args)
  @ole.method_missing(cmd, *args)
end

Instance Attribute Details

#lastargsObject (readonly)

Returns the value of attribute lastargs.



1276
1277
1278
# File 'lib/ole20110223-013209.rb', line 1276

def lastargs
  @lastargs
end

#oleObject (readonly)

Returns the value of attribute ole.



1277
1278
1279
# File 'lib/ole20110223-013209.rb', line 1277

def ole
  @ole
end

Instance Method Details

#AttachToStream(stream) ⇒ Object

method VOID AttachToStream

IP2DataStream stream [IN]


1308
1309
1310
# File 'lib/ole20110223-013209.rb', line 1308

def AttachToStream(stream)
  @ole._invoke(1, [stream], [VT_BYREF|VT_DISPATCH])
end

#Clear(table_name) ⇒ Object

method VOID Clear

BSTR table_name [IN]


1330
1331
1332
# File 'lib/ole20110223-013209.rb', line 1330

def Clear(table_name)
  @ole._invoke(6, [table_name], [VT_BSTR])
end

#ClearAllObject

VOID ClearAll: method Clear



1335
1336
1337
# File 'lib/ole20110223-013209.rb', line 1335

def ClearAll()
  @ole._invoke(8, [], [])
end

#clsidObject



1292
1293
1294
# File 'lib/ole20110223-013209.rb', line 1292

def clsid
  CLSID
end

#Count(table_name) ⇒ Object

method I4 Count

BSTR table_name [IN]


1324
1325
1326
# File 'lib/ole20110223-013209.rb', line 1324

def Count(table_name)
  @ole._invoke(5, [table_name], [VT_BSTR])
end

#CountTablesObject

method I4 CountTables



1318
1319
1320
# File 'lib/ole20110223-013209.rb', line 1318

def CountTables()
  @ole._invoke(3, [], [])
end

#DetachFromStreamObject

method VOID DetachFromStream



1313
1314
1315
# File 'lib/ole20110223-013209.rb', line 1313

def DetachFromStream()
  @ole._invoke(2, [], [])
end

#keep_lastargs(return_value) ⇒ Object



1287
1288
1289
1290
# File 'lib/ole20110223-013209.rb', line 1287

def keep_lastargs(return_value)
  @lastargs = WIN32OLE::ARGV
  return_value
end

#progidObject



1296
1297
1298
# File 'lib/ole20110223-013209.rb', line 1296

def progid
  PROGID
end

#StreamDataBegin(stream) ⇒ Object

method VOID StreamDataBegin

IP2DataStream stream [IN]


1395
1396
1397
# File 'lib/ole20110223-013209.rb', line 1395

def StreamDataBegin(stream)
  @ole._invoke(8, [stream], [VT_BYREF|VT_DISPATCH])
end

#StreamDataDeleted(stream, table_name, id, rec) ⇒ Object

method VOID StreamDataDeleted

IP2DataStream stream [IN]
BSTR table_name [IN]
I8 id [IN]
IP2Record rec [IN]


1368
1369
1370
# File 'lib/ole20110223-013209.rb', line 1368

def StreamDataDeleted(stream, table_name, id, rec)
  @ole._invoke(4, [stream, table_name, id, rec], [VT_BYREF|VT_DISPATCH, VT_BSTR, VT_I8, VT_BYREF|VT_DISPATCH])
end

#StreamDataEnd(stream) ⇒ Object

method VOID StreamDataEnd

IP2DataStream stream [IN]


1401
1402
1403
# File 'lib/ole20110223-013209.rb', line 1401

def StreamDataEnd(stream)
  @ole._invoke(9, [stream], [VT_BYREF|VT_DISPATCH])
end

#StreamDataInserted(stream, table_name, rec) ⇒ Object

method VOID StreamDataInserted

IP2DataStream stream [IN]
BSTR table_name [IN]
IP2Record rec [IN]


1350
1351
1352
# File 'lib/ole20110223-013209.rb', line 1350

def StreamDataInserted(stream, table_name, rec)
  @ole._invoke(2, [stream, table_name, rec], [VT_BYREF|VT_DISPATCH, VT_BSTR, VT_BYREF|VT_DISPATCH])
end

#StreamDataUpdated(stream, table_name, id, rec) ⇒ Object

method VOID StreamDataUpdated

IP2DataStream stream [IN]
BSTR table_name [IN]
I8 id [IN]
IP2Record rec [IN]


1359
1360
1361
# File 'lib/ole20110223-013209.rb', line 1359

def StreamDataUpdated(stream, table_name, id, rec)
  @ole._invoke(3, [stream, table_name, id, rec], [VT_BYREF|VT_DISPATCH, VT_BSTR, VT_I8, VT_BYREF|VT_DISPATCH])
end

#StreamDatumDeleted(stream, table_name, rev) ⇒ Object

method VOID StreamDatumDeleted

IP2DataStream stream [IN]
BSTR table_name [IN]
I8 rev [IN]


1376
1377
1378
# File 'lib/ole20110223-013209.rb', line 1376

def StreamDatumDeleted(stream, table_name, rev)
  @ole._invoke(5, [stream, table_name, rev], [VT_BYREF|VT_DISPATCH, VT_BSTR, VT_I8])
end

#StreamDBWillBeDeleted(stream) ⇒ Object

method VOID StreamDBWillBeDeleted

IP2DataStream stream [IN]


1382
1383
1384
# File 'lib/ole20110223-013209.rb', line 1382

def StreamDBWillBeDeleted(stream)
  @ole._invoke(6, [stream], [VT_BYREF|VT_DISPATCH])
end

#StreamLifeNumChanged(stream, life_num) ⇒ Object

method VOID StreamLifeNumChanged

IP2DataStream stream [IN]
I4 life_num [IN]


1389
1390
1391
# File 'lib/ole20110223-013209.rb', line 1389

def StreamLifeNumChanged(stream, life_num)
  @ole._invoke(7, [stream, life_num], [VT_BYREF|VT_DISPATCH, VT_I4])
end

#StreamStateChanged(stream, new_state) ⇒ Object

method VOID StreamStateChanged

IP2DataStream stream [IN]
TDataStreamState new_state [IN]


1342
1343
1344
# File 'lib/ole20110223-013209.rb', line 1342

def StreamStateChanged(stream, new_state)
  @ole._invoke(1, [stream, new_state], [VT_BYREF|VT_DISPATCH, VT_DISPATCH])
end

#TableRecordsObject

PTR TableRecords: property Records

BSTR table_name [IN]


1302
1303
1304
# File 'lib/ole20110223-013209.rb', line 1302

def TableRecords
  @_TableRecords ||= OLEProperty.new(@ole, 4, [VT_BSTR], [VT_BSTR, VT_BYREF|VT_DISPATCH])
end