Hi,
I just wondering if anyone has already tried of doing something like schema inheritance in BizTalk schemas?
I am using WCF Adapter and using 'consume adapter service' to generate a schema automatically, what I wanted is instead of always generating a schema and since most of my schema is the same then I want to have something like ...
Hi folks, I think I'm running into an inheritance conceptual wall with my Java arrays. I'm kind of new to Java so please tell me if I have things upside down. In essence, I want to do three things:
Create a runnersArray with the attributes of my Runners class.
Fill my runnersArray using my GenerateObjects method of my GenerateObjects c...
Hi,
What is the reason for the following code that does not let me to create object.
class base
{
public:
void foo()
{ cout << "base::foo()"; }
};
class derived : private base
{
public:
void foo()
{ cout << "deived::foo()"; }
};
void main()
{
base *d = new derived();
d->foo();
}
It Gi...
I am trying to inherit from and extend a structure defined in MIDL. I used the same syntax as for interface inheritance i.e
typedef struct stDBIBinVarDataEx
{
float x;
} MYSTRUCT ;
struct struct2 : MYSTRUCT
{
float y;
};
but the compiler generates errors.
...
What are the advantages/disadvantages of Option 2 over 1 in this example?
Option 1 (Inheritance):
public class SalesList : List<Sales>
{
//methods that add extra behavior List<Sales>
}
Option 2 (Composition):
public class SalesList
{
private List<Sales> _list;
//methods that add extra behavior to List<Sales>
}
...
I'm trying to make sure that every child of a given element (MPF.MWindow) gets custom templates. For instance, the button should get the template defined in resMButton.xaml. As of now I'm using the following code on: (resMWindow.xaml)
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
...
I have these classes:
class Base
{
...
private:
std::vector<X> v;
};
class Derived : public Base
{
Derived(X*, int n);
};
where the constructor of Derived is passed an array of item Xs, which I need to insert into my vector v in the Base class. (X is a smart pointer)
Currently I see two ways to do this:
Create a function in Base:
...
I have the following class definition:
template<typename QueueItemT>
class QueueBC
{
protected:
QueueBC() {}
virtual ~QueueBC() {}
private:
virtual IItemBuf* constructItem(const QueueItemT& item) = 0;
}
I created the following sub-class:
class MyQueue
: public QueueBC<MyItemT>
{
public:
MyQueue() {}
virtual...
This question may sound too silly, however , I don't find concrete answer any where else.
With little knowledge on how late binding works and virtual keyword used in inheritance.
As in the code sample, when in case of inheritance where a base class pointer pointing to a derived class object created on heap and delete operator is used...
I have an abstract entity:
public abstract class Entity extends JPanel implements FocusListener
And I have a TextEntity:
public class TextEntity extends Entity
Inside TextEntity's constructor I want to put a JTextArea that will cover the panel:
textArea = new JTextArea();
textArea.setSize(getWidth(),getHeight());
add(textArea);
...
Below is an example of how I currently use automapping overrides to set up a my db representation of inheritance. It gets the job done functionality wise BUT by using some internal default values. For example, the discriminator column name winds up being the literal value 'discriminator' instead of "ActivityType, and the discriminator va...
I'm having difficulty with an architectural decision for my C# XNA game.
The basic entity in the world, such as a tree, zombie, or the player, is represented as a GameObject. Each GameObject is composed of at least a GameObjectController, GameObjectModel, and GameObjectView.
These three are enough for simple entities, like inanimate t...
I have a structure of base class and a couple of inherited classed.
Base class should be pure virtual class, it should prevent instantiation.
Inherited classes can be instantiated.
Code example below:
class BaseClass
{
public:
BaseClass(void);
virtual ~BaseClass(void) = 0;
};
class InheritedClass : public BaseClass
{
public:
...
I have an Object
(
[id] => 1
[parent_id] => 0
[result:Database:private] =>
[db:Database:private] => mysqli Object
(
[affected_rows] => 0
...
)
)
Obviously, the Object has inherited the 'db' and 'result' properties of the parent Database c...
I'm looking for a clean C++ idiom for the following situation:
class SomeLibraryClass {
public:
SomeLibraryClass() { /* start initialization */ }
void addFoo() { /* we are a collection of foos */ }
void funcToCallAfterAllAddFoos() { /* Making sure this is called is the issue */ }
};
class SomeUserClass : public SomeLibrary...
Hello,
I have a sub class that calls a method from a super class. and the method in the super class use a method that is defined in the super class as asbstract(not really abstract) but implemented in the sub class.
for example:
package BaseClass;
sub new
{
}
sub method1 {
return someAbstractMethod();
}
sub someAbtsractMetho...
Let's say I have defined the following class:
public abstract class Event {
public DateTime Time { get; protected set; }
protected Event(DateTime time) {
Time = time;
}
}
What would you prefer between this:
public class AsleepEvent : Event {
public AsleepEvent(DateTime time) : base(time) { }
}
public class A...
In PHP, is it possible to have multiple inheritance (by the nature of the PHP, not writting modification code) ?
example :
class a
{
public function foo();
}
class b
{
public function bar();
}
class c extends a, b
{
public function baz();
}
...
Is it OK to derive an abstract class from a non-abstract class or is there something wrong with this approach?
Here´s a little example:
public class Task {
// Some Members
}
public abstract class PeriodicalTask : Task {
// Represents a base class for task that has to be done periodicaly.
// Some additional Members
}
public clas...
So I have a fairly simple vertical CSS menu based off of UL.
<ul class="vertnav">
<li><a href="unselected1.php">Item1</a></li>
<li><a href="unselected2.php">Item2</a></li>
<li><a href="selected.php" class="vertnavdown">Selected</a></li>
</ul>
I want three basic colors (say tan for default LI, orange for VERTNAVDOWN, and red for A:HOVE...