virtual

How would I go about writing a Virtual Machine

I'm interested in programming a virtual machine, nothing as fancy as virtualbox or vmware, but something that can emulate a simple architecture, be it cisc or risc, say the Zilog, SPARC, MIPS, or 80686 architecture models. I suppose by doing this it would be relatively simple to make an emulator of the same kind, I'm just interested in ...

C++ Virtual function implementation?

If I have in C++: class A { private: virtual int myfunction(void) {return 1;} } class B: public A { private: virtual int myfunction(void) {return 2;} } Then if I remove virtual from the myfunction definition in class B, does that mean that if I had a class C based on class B, that I couldn't override the myfunction since it w...

Magic Packets and Virtual Networks

Hi All, I have 2 virtual networks, say 10.116.10.xxx and 10.116.11.xxx. I have the following code to send a magic packet: using System; using System.Net; using System.Net.Sockets; using System.Globalization; public class MagicPackets:UdpClient { public MagicPackets() : base() { } public void SetClientToBrodcastMod...

Access virtual folder under My Computer

When I connect my digital camera, it creates a folder under My Computer named Canon PowerShot SD1100 IS. Using the File Explorer, I can browse this folder and its subfolders to access the pictures on the camera. Can anyone tell me how to access this folder and its subfolders programmatically? From within my software, I can drill down i...

Destructor of a concrete class

Guideline #4 link text, states: A base class destructor should be either public and virtual, or protected and nonvirtual. Probably I'm missing something, but what if I just create a concrete class, that is not designed to be used as base class. Should I declare it's destructor public and virtual? By this I'm implicitly declate...

xcode compiler see a class as abstract but it's not!

Hi, I'm working on a C++ command tool project that depends on a third party architecture called ACE (adaptive communication environment). I'm new to Xcode and this is what I've done to have my command tool project "sees" the ACE library. compile the ACE library so that I have a bunch of dynamic libraries: xxx.dylib add the libraries a...

c++ virtual class, subclass and selfreference...

consider this class: class baseController { /* Action handler array*/ std::unordered_map<unsigned int, baseController*> actionControllers; protected: /** * Initialization. Can be optionally implemented. */ virtual void init() { } /** * This must be implemented by subclasses in order to implement...

Any free or open source virtual in-memory drive?

Any free or open source virtual in-memory drive? I'm developing an plug-in for a host program and I need to comminute with it with temporary files in the disk, if the temporary files are stored in an in-memory virtual drive the performance can be increased dramatically. Hints for implementing an in-memory virtual drive in Delphi is als...

Working with multiple branches in ASP .NET

I've seen several other posts similar to this (namely http://stackoverflow.com/questions/5237/solutions-for-working-with-multiple-branches-in-asp-net) but there are several issues that I have that seem to be different than other similar posts. I have an ASP .NET application that uses a virtual directory off of localhost. There are sever...

How to design a C++ API for binary compatible extensibility

I am designing an API for a C++ library which will be distributed in a dll / shared object. The library contains polymorhic classes with virtual functions. I am concerned that if I expose these virtual functions on the DLL API, I cut myself from the possibility of extending the same classes with more virtual functions without breaking bi...

C++ collection of abstract base classes

hello how can I create STL collection of classes which implement abstract base class using the base class as collection value, without using pointers? is there something in Boost that allows me to implement it? The collection specifically is map. Thanks ...

[C++] Using a virtually inherited function non-virtually?

Hello! I have run into trouble trying to implement functionality for serializing some classes in my game. I store some data in a raw text file and I want to be able to save and load to/from it. The details of this, however, are irrelevant. The problem is that I am trying to make each object that is interesting for the save file to be ab...

C++ static virtual members?

Is it possible in C++ to have a member function that is both static and virtual? Apperantly, there isn't a straight-forward way to do it (static virtual member(); is a complie error), but at least a way to acheive the same effect? I.E: struct Object { struct TypeInformation; static virtual const TypeInformation &GetTypeInfor...

C++ : implications of making a method virtual

Hi all, Should be a newbie question... I have existing code in an existing class, A, that I want to extend in order to override an existing method, A::f(). So now I want to create class B to override f(), since I don't want to just change A::f() because other code depends on it. To do this, I need to change A::f() to a virtual method...

Is there a way to mount Android .img to access the AVD (Android Virtual Device) contents?

I feel a bit blind developing on an emulator for Android and not being able to see the file system on the AVD (.img). Is there a way to mount it in Windows or Linux, so that I could at least see the file listing and maybe contents? Bonus if it's mounted with write permissions as well. Thank you. ...

Baseclass Virtual Destructor Access Violation

Sorry if this was asked already, but I had a hard time searching for destructor and access violation =) Here's C++ pseudo-code the scenario: In DLL1 (compiled with /MT) class A { public: virtual ~A() <== if "virtual" is removed, everthing works OK { } } class B : public A { public: __declspec( dllexport ) ~B() ...

How can I have both abstract and virtual methods in one class?

In the following parent class SqlStatement, how can I make Initialize() abstract but keep Execute() virtual? using System; using System.Collections.Generic; namespace TestSql28374 { class Program { static void Main(string[] args) { object item = new object(); List<string> properties = new...

simulate virtual constructor in c++

Hi, In my application I have to derive some classes from a base one, the problem is that I want to enforce the derived classed to have 3 particular constructor implementation. As c++ don't have virtual pure constructor, it seemed quite desperate (I had to check manually each class implementation to ensure that the particular ctors are i...

virtual column for drop down in the ruby on rails.

How to place a drop down for the virtual column, in the ruby on rails. The virutal column does not exist in my table , but I want to get the value from the drop down ,when user saves the data. for example, product_price is a virtual column , which doesn't exist in my database table. But I would like to have a dropdown, with product pr...

Force derived class to call base function

If I derive a class from another one and overwrite a function, I can call the base function by calling Base::myFunction() inside the implementation of myFunc in the derived class. However- is there a way to define in my Base class that the base function is called in any case, also without having it called explicitly in the overwritten f...