|
81-100 of 409
Previous
Next |
|
Testing a Business Rule Should Not Have Any Side Effects
by Patrick Marshall
Testing a business rule should have no side effects. Avoid err.raise and msgboxes inside business rule tests.
|
|
Add Testing Code to a Class With Static Inner Classes
by Shantanu Garg
Static inner classes are pretty simple in concept and implementation.
|
|
Private Access
by Tareq Shaheen
This tip clarifies the meaning of
|
|
A template for building collection class modules
by Francesco Balena
The following is a template for building collection class modules in a very quick and effective way. Copy-and-paste this code into Notepad, that save it to a file named "COLLECTION CLASS.CLS" in the \TEMPLATE\CLASSES subdirectory under the main VB6 directory:
VERSION 1.0 CLASS
BEGIN
|
|
Accessing a Private Data Member from a Different Object
by Danny Kalev
Different objects of the same class can access each other's members, even if these members are private. For ...
|
|
Accessing Class Members From the Static Member Function
by Rajesh Chathapuram
When a class has Thread entry functions, it is usually declared as static member functions of the class as in the example ...
|
|
How to Use an Abstract Class and Define Its Abstract Methods at Instantiation
by Ngo Minh
Suppose you have an abstract class MyAbstractClass with an abstract method ...
|
|
Why Static Methods Can Only Make Calls to Static Methods
by Shantanu Garg
Write the following code, compile it, then try to run ...
|
|
Using Memset On Class Objects
by Nitin Kumar
It's common practice in C, to do a memset on structures, in order to initialize all member variables to some default value, usually NULL. Similarly, you can use memset to initialize class objects.
|
|
Structs and Unions
by C.S. Niranjan
It is common knowledge that the only difference between a struct and a union in C is that all elements of a union share the same memory location but the elements of struct do not. In C++, a ...
|
|
Exception Handling, Inheritance and the Need For Strict Rules
by Anil Nair
Java has some strict rules for exception handling when it comes to inheritance and overriding of methods.
|
|
Forward Declaration of Classes and Structs
by Danny Kalev
You can use the keywords class and struct in forward declarations interchangeably. For ...
|
|
Covariant Template Parameters
by Danny Kalev
Suppose you need to define a function that takes a vector object and performs certain operations on it. The function has to be generic, that is, it should handle all instances of std::vector in ...
|
|
Function Object Bases
by Danny Kalev
To simplify the process of writing custom function objects, the Standard Library provides two classes that serve as base classes of such objects: std::unary_function and std::binary_function. ...
|
|
Avoiding Dependencies #2
by Jon Jagger
Many C++ programmers will be familiar with the tidal wave of recompilations that occur when a seemingly unrelated header file is changed. C++ file dependencies need to be managed otherwise ...
|
|
Avoiding Dependencies #1
by Jon Jagger
Many C++ programmers will be familiar with the tidal wave of recompilations that occur when a seemingly unrelated header file is changed. C++ file dependencies need to be managed otherwise ...
|
|
Don't Forget the Closing Semicolon in Class Definitions
by Danny Kalev
Here's a very common error. You define a class but forgot to add a semicolon after the closing }. For ...
|
|
Copy Constructor's Signatures
by Danny Kalev
C++ defines four possible forms for a class's copy constructor. For a class called X, a copy constructor can have one of the following ...
|
|
Qualified Calls
by Danny Kalev
A function call such as the ...
|
|
"Setter" and "Getter" Member Functions
by Danny Kalev
Encapsulation is a fundamental principle in object orientation. Encapsulation restricts direct access to a data member of a class. Instead, users query the object itself in order to get or set its ...
|
|
81-100 of 409
Previous
Next |