My current project requires to have some lines after properties and methods definition inside a class definition , not before. It seems that the current version of ClassBuilder allows the access to only before properties and methods definition inside a class.
Is there anyway to have extra lines there?
Thanks in advance!
KS
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I know of reasons for doing it prior to the properties and methods but I haven't come accross any for after. Maybe there is a work around for what you are trying to do.
You maybe able to do something with a context
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Possible areas to check:
1) Your compiler is a one pass compiler that doesn't do forward referencing very well. You could place a forward reference before you class to see if that helps.
2) Check to see what your macro is doing. Since my macro worked, there must be something hide inside your macro that is causing the problem.
Craig
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi.
My current project requires to have some lines after properties and methods definition inside a class definition , not before. It seems that the current version of ClassBuilder allows the access to only before properties and methods definition inside a class.
Is there anyway to have extra lines there?
Thanks in advance!
KS
Could you give an example?
I know of reasons for doing it prior to the properties and methods but I haven't come accross any for after. Maybe there is a work around for what you are trying to do.
You maybe able to do something with a context
Thanks for your reply.
I'd like to deploy GigaBase, which is an opensource ojbect relational database available following URL:
http://www.garret.ru/~knizhnik/gigabase.html
It requires to have db implementations after the properties and methods inside the class. For example, to make a class storalbe into db:
class Detail {
public:
char const* name;
char const* material;
char const* color;
real4 weight;
TYPE_DESCRIPTOR((KEY(name, INDEXED|HASHED),
KEY(material, HASHED),
KEY(color, HASHED),
KEY(weight, INDEXED),
};
Implementing TYPE_DESCRIPTOR prior to the properties and methods causes compilation error.
KS
The following example compiled under Visual C++ .NET and it looks similar to your example.
#ifndef _A_H
#define _A_H
//@START_USER1
//@END_USER1
class A
{
//@START_USER2
#define TYPE_DESCRIPTOR(A, B) char * X##A, X##B ;
TYPE_DESCRIPTOR(_A1, _A2)
//@END_USER2
// Members
private:
char * _A1;
char * _A2;
protected:
public:
// Methods
private:
void ConstructorInclude();
void DestructorInclude();
protected:
public:
virtual ~A();
};
#endif
#ifdef CB_INLINES
#ifndef _A_H_INLINES
#define _A_H_INLINES
//@START_USER3
//@END_USER3
#endif
#endif
Possible areas to check:
1) Your compiler is a one pass compiler that doesn't do forward referencing very well. You could place a forward reference before you class to see if that helps.
2) Check to see what your macro is doing. Since my macro worked, there must be something hide inside your macro that is causing the problem.
Craig
Thanks!
Oops. It worked. Probably I made a basic syntax error or something. Now I can use ClassBuilder for my project! That's great!
KS