|
|
Up |
|
|
  |
|
|
  |
|
|
  |
|
|
  |
|
|
  |
Author: Ross A. FinlaysonRoss A. Finlayson
Date: Apr 4, 2008 19:55
I wrote up a little program that generates C++ from a simple input
format, a list of relations. Basically I'm trying to understand
"composition hierarchy" vis-a-vis "inheritance hierarchy."
The inheritance hierarchy has a mechanism in C++ to describe it, class
inheritance, but there doesn't seem to be built-in support for
composition hierarchy. That's no exactly so, but to iterate over the
contained elements of a class requires the implementation of an
iterator, and for nested composition as a tree, depth or breadth first
iterators or iterators to given depths or heights.
So I began with simply a tree to represent a composition hierarchy, then
got to having each node (class type) having as well a list of child
elements to represent inheritance hierarchy, then got to having multiple
parents in the tree for inheritance, and then also there could be
multiple parents in composition, along the lines of different uses of
the objects.
|
| Show full article (3.34Kb) |
|
2 Comments |
|
  |
Author: úÏÌÏÔÏÊ ëÌÏÎúÏÌÏÔÏÊ ëÌÏÎ
Date: Apr 4, 2008 19:49
Нарезать или нашинковать картофель, перец, баклажаны, морковь, яблоки,
приготовить салаты или детские овощные и фруктовые пюре. Вы сможете
всё это сделать с помощью одного инструмента - многофункциональной
тёрки
Терка для овощей и фруктов http://shopbody.ru/dekokUKA1214.htm
Тёрка имеет 5 съёмных насадок, которые помогут Вам превратить
приготовление пищи в настящее творчество. Лезвия ножей изготовлены из
высокопрочной нержавеющей стали.
прямая нарезка
волнистая нарезка
шинковка
измельчитель
тёрка для овощных пюре
Насадки убираются в корпус тёрки для компактного хранения.
Пазы на корпусе позволяют использовать устройство на различных
ёмкостях.
Конструкция ручки удобна для горизонтальной эксплуатации и настенного
хранения.
Держатель исключает соскальзывание.
|
| Show full article (1.70Kb) |
|
no comments
|
|
  |
|
|
  |
|
|
  |
Author: worlman385worlman385
Date: Apr 4, 2008 18:51
Why the following header file - database.h must put
class Database;
class Table;
at the beginning?
Is that if I define multiple Class in a single .h file, then I need to
put all Class name at the beginning?
================
class Database;
class Table;
class Database
{
public:
CnnPtr m_Cnn;
char m_ErrStr[500];
Database();
bool Open(char* UserName, char* Pwd,char* CnnStr);
bool Execute(char* CmdStr, Table& Tbl);
void GetErrorErrStr(char* ErrStr);
};
|
| Show full article (1.10Kb) |
|
3 Comments |
|
  |
|
|
  |
Author: Jim JohnsonJim Johnson
Date: Apr 4, 2008 18:29
is this C style coding?
I don't seem to see much C++ code in this way.
is this a bad programming practice?
code seem ugly coding this way.
=================
CATCHERROR(m_Cnn,0)
=================
#define CATCHERROR(ptr,a) catch(_com_error &e)\
{\
ErrorHandler(e,m_ErrStr);\
ptr=NULL;\
return a;\
}
|
| |
|
1 Comment |
|
|
|
|
|
|