virtual

UNIX web development server for virtual machine PC in Windows

I'm planning to build Linux web development server in virtual machine environment on Windows Virtual PC. As I don't have much experience with installing and configuring Linux web servers, I wanted to ask for some advice: What Linux distribution do you recommend for such server? I want the virtual server to look like real hosting enviro...

Object layout in case of virtual functions and multiple inheritance

Hi, I was recently asked in an interview about object layout with virtual functions and multiple inheritance involved. I explained it in context of how it is implemented without multiple inheritance involved (i.e. how the compiler generated the virtual table, insert a secret pointer to the virtual table in each object and so on). It see...

How to Implement a Base Class with a Method and yet force the Derived Class to Override it?

Having something like this this : public abstract class AAA { protected abstract virtual string ToString() // Error { // Base Stuff } } public abstract class BBB : AAA { public override string ToString() { // Use base.ToString(); // More Stuff } } I read another post (http://stackoverflow.com/questions/6133...

How virtual is this?

Hi, can you explain me why: int main (int argc, char * const argv[]) { Parent* p = new Child(); p->Method(); return 0; } prints "Child::Method()", and this: int main (int argc, char * const argv[]) { Parent p = *(new Child()); p.Method(); return 0; } prints "Parent::Method()"? Classes: class Parent { publ...

virtual data type/enum

Hello, I want a virtual class like this: class Configuration { public: enum EPromptId; virtual CString getPrompt( EPromptId promptId ) = 0; private: }; So that each derived configuration can have its own set of EPromptIds class Configuration1 : public Configuration { public: enum EPromptId{ epid_HappyBirthday ...

Virtual Machine Manager Error - Error determing default hypervisor

I have Fedora 11 and trying to get Xen working (which I think it is already) but the Virtual Machine Manager cannot find the hypervisor. When starting Virtual Machine Manager, I receive the following error Error determining default hypervisor. Could not populate a default connection. Make sure the appropriate virtualization packages ...

C++ Style: Prefixing virtual keyword to overridden methods

I've been having a discussion with my coworkers as to whether to prefix overridden methods with the virtual keyword, or only at the originating base class. I tend to prefix all virtual methods (that is, methods involving a vtable lookup) with the virtual keyword. My rationale is threefold: Given that C++ lacks an override keyword, the...

C++ Inheritance/VTable questions

Update: Replaced the destructor example with a straight up method call example. Hi, If I have the following code: class a { public: virtual void func0(); // a has a VTable now void func1(); }; class b : public a { public: void func0() { a::func0(); } void func2(); }; Is there a VTable in B? B has no virtual functio...

can we implement a java interpreter in hardware that executes Java bytecodes natively?

if we implement java interpreter in hardware then how we can achieve architecture neutrality of java bytecode... does java uses JIT(just in time interpreter) ? and how all this is related to Virtual Machine concept of operating system and java virtual machine(JVM) ...

How to mix-and-match inputs from two game controllers into one "virtual" controller?

Image the following situation: You're on Windows XP (even though the dialog shown below is a Vista screenshot). You have two physical USB game controllers, let's call them A and B. You have a piece of software that apparently accesses joysticks in a legacy way, only recognizing and allowing use of one single joystick. When using this s...

Acceptable to use virtual inheritance to prevent accidentally creating a diamond?

This is a simplification of some real code, and a real mistake I made when I didn't realize someone else had already implemented Foo and derived from it. #include <iostream> struct Base { virtual ~Base() { } virtual void print() = 0; }; struct OtherBase { virtual ~OtherBase() { } }; struct Foo : public Base { // better to us...

In C++, is a function automatically virtual if it overrides a virtual function?

I would expect that if foo is declared in class D, but not marked virtual, then the following code would call the implementation of foo in D (regardless of the dynamic type of d). D& d = ...; d.foo(); However, in the following program, that is not the case. Can anyone explain this? Is a method automatically virtual if it overrides a v...

What's the difference between virtual function instantiations in C++?

What's the difference between the following two declarations? virtual void calculateBase() = 0; virtual void calculateBase(); I read the first one (=0) is a "pure abstract function" but what does that make the second one? ...

Has anyone setup tomcat to run virtual hosts using mod_jk

I work in OSX primarily with mostly PHP. Normally I work locally using MAMP and virtual hosts setup in my httpd.conf so that I can point a browser to http://some-project and have as many projects as I need setup. We have a project coming up where we need to serve JSP pages and I would like to set up my local apache server to serve only...

virtual attribute problems with undefined methods

I've used Virtual attributes in the past but I can't seem to get past this, and I know the answer is probably staring me in the face. I have a model like so: model Confirmation.rb class Confirmation < ActiveRecord::Base #attr_accessible :confirmation, :confirmation_token #attr_accessible :confirmation_token def confirmation_to...

Is there any relation between Virtual destructor and Vtable

If we write virtual function it adds a vtable in object of that class. Is it true for virtual destructor too ? Is vtable used to implement virtualness of destructor ...

Where virtual constructors are used ?

I read about virtual constructors are used for implementing some design patterns, but didn't understood any need of virtual constructors. So what are virtual constructors and why we really need them? ...

C++ Overridden method not getting called

Shape.h namespace Graphics { class Shape { public: virtual void Render(Point point) {}; }; } Rect.h namespace Graphics { class Rect : public Shape { public: Rect(float x, float y); Rect(); void setSize(float x, float y); virtual void Render(Point point); private: float sizeX; float s...

simple VirtualFilesystem for delphi - must be FREE!

Hi, my application stores infos about some files analyzed in given directory... it produces one file for each file found in a directory, so it could be any number ... I need to store those produced files separately, but it's not the best idea to put them like it is ... so I'm looking for some virtual filesystem, which would allow me to k...

combine directories into a virtual one

Hello in Windows XP Does anybody know a software that maps multiple directories to ONE virtual drive or directory? When I open the virtual directory, I want to see all files from mapped directories as if it was one physical dir. Linux software mhddfs seems to correspond exactly to my need. from http://svn.uvw.ru/mhddfs/trunk/READM...