Questions tagged [virtual-table]
31 questions
0
votes
1 answer
How does a pointer to a Base class which initialized by a derived class can have *__vptr called the right virtual function?
Would someone please explain to me the bold parts?
I didn't get how come *__vptr which is in the Base portion of the class and dPtr has access to this pointer CAN all of a sudden point to the D1 virtual table instead of the Base virtual table!
I…

Sami
- 513
- 4
- 11
0
votes
2 answers
How to access HIVE ACID tables using HANA SDA Virtual table?
We are currently using HANA 1 sps 12 and SPARK controller to create virtual tables and access the HIVE data in HANA. The problem is we have some SC2 table we want to archive in HANA for which we need full CRUD operation. We have converted a few of…

deba prasad nayak
- 21
- 6
0
votes
2 answers
cpp class size with virutal pointer and inheritance
class A{
virtual void a();
};
class B : A{
virtual void a();
};
class C{
virtual void a();
};
class E : A, C{
virtual void a();
};
int main(){
std::cout << (sizeof(B)) << "\n"; // 4
std::cout << (sizeof(C)) << "\n"; // 4
…

Athos
- 145
- 1
- 1
- 11
0
votes
1 answer
For a polymorphic type T, how to obtain the pointer to the virtual table of T without an instance of type T
I have an inheritance hierarchy with single inheritance and I want to check if the object pointed to by a pointer to base is exactly of derived type T.
I have written two ways and compared the assembly code:
template
void const *…
0
votes
0 answers
Race condition reading C++ vtable. Is possible?
I have an app crashing some times because the MS _purecall is being called but the data I see on the crash dump is not what I expected.
I have CSocket derived from CConnection, the latter has a pure virtual function named DoRead and the app crashes…

Mauro H. Leggieri
- 1,084
- 11
- 25
0
votes
1 answer
Create virtual table with rowid only of another table
Suppose I have a table in sqlite as follows:
`name` `age`
"bob" 20 (rowid=1)
"tom" 30 (rowid=2)
"alice" 19 (rowid=3)
And I want to store the result of the following table using minimal storage space:
SELECT *…

David542
- 104,438
- 178
- 489
- 842
0
votes
2 answers
are vptr and vtable inherited from base class?
As can be seen, D3 introduces a new virtual function, @function3(), in the middle of the chain of inheritance. I am wondering what is happening with *--vptr and vtable when this happens. D3 is a 'kind of' a new base class now,
class Base {
public:
…

meng
- 3
- 2
0
votes
1 answer
How to properly write and read class instance with vtable into the QSharedMemory?
I have a class derived from an interface
class Interface {
public:
virtual void foo() = 0;
};
class Implementer : public Interface {
public:
void foo() override { std::cout << "Hello world" << std::endl; }
private:
int…

arsdever
- 1,111
- 1
- 11
- 32
0
votes
0 answers
What is better in terms of performance in T-SQL? Inner + Sub-Queries or Inner + Virtual Table?
I have a doubt in terms of performance.
What is better?
Multiple nested Inner Joins + SubQueries with a specific WHERE clause (the table has indexes).
Creating a virtual table with row data and relating it with Inner Joins?

AMF
- 1
0
votes
0 answers
Virtual Table (aka View)
We use a cloud based system to handle patient data.
The vendors of that system log ship a copy of their SQL database to use and we restore it locally so we can do our reporting. Those local tables are locked down and set read-only. We don't have…

Mr. Diaz
- 26
- 1
0
votes
1 answer
Why is there a top_offset in VTT implemented by gcc?
Here is a detailed description of VTT in the top-voted answer.But the answer does not explain why is there a top-offset in the VTT.
From my point of view,when we down_cast a base pointer to derived pointer,the compiler already knows the offset…

choxsword
- 3,187
- 18
- 44
0
votes
1 answer
Why the need of virtual tables on calling virtual functions at runtime?
I was following this tutorial, trying to understand virtual table and the whole process behind pointer and virtual functions in C++.
Not sure, when I have code like this:
D1 d1;
Base *dPtr = &d1;
dPtr->function1();
Why do I need all of this virtual…

markzzz
- 47,390
- 120
- 299
- 507
0
votes
0 answers
Scala overridden fields: are overridden fields also in virtual table?
Scala overridden fields: are overridden fields also in virtual table?
I'm new to Scala. Conceptually, overridden class methods are in vritual table, but I'm not sure
whether overridden fields are also in virtual table?
class A
{
…

CodingNow
- 998
- 1
- 11
- 23
0
votes
0 answers
MongoDB BI Connector: How to assing value to variable in select statement
I need to generate virtual table and fill it with range of date values.
The following query normally executes in MySql:
SELECT DATEID, STR_TO_DATE(DateValue, '%Y-%m-%d %H:%i:%s') AS DateValue FROM(
SELECT CONVERT(DATE_FORMAT(ADDDATE(@day, INTERVAL…

sjahongir
- 23
- 7
0
votes
1 answer
What is use of Virtual table auto generated tables
I was doing some debugging with sql queries, executed following to create an Virtual Table:
sqlite> CREATE VIRTUAL TABLE email_fts USING fts3(subject, body, "to", "from");
& checked schema where it showing additional 3 table references to created…

CoDe
- 11,056
- 14
- 90
- 197