473,387 Members | 1,882 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Macro Name In Calss Definition

hi

In a project I saw following line of code :

class PDS_COREDLL_API cMatrix

viewing the definition of the PDS_COREDLL_API

I was directed to a file having these lines of code

// Library DLLs
#define PDS_COREDLL_API


Could anyone gentleman let me know the significance?


Rupesh
Jan 8 '08 #1
5 1753
weaknessforcats
9,208 Expert Mod 8TB
I have no idead what this is. PDS_COREDLL_API is defined as nothing so the result is:
Expand|Select|Wrap|Line Numbers
  1. class cMatrix
  2. etc...
  3.  
I suspect that if it were defined as something your code would not compile.

Now I have see this sort of thing when it comes to functions. You can place a qualifer in that position (between the function name and the return type) that specifies the calling convention.
Jan 8 '08 #2
This is another instance of similar code


I found

claass PDS_EXPORT someClass
{
...

}


and the definition of PDS_EXPORT led me to


#define PDS_EXPORT
#ifdef __MFC_AFX__
//#include "stdafx.h"
#include <afxwin.h> // this file exists and is a MFC file
#endif
#endif

TIA

Rupesh
Jan 9 '08 #3
Savage
1,764 Expert 1GB
This is another instance of similar code


I found

claass PDS_EXPORT someClass
{
...

}


and the definition of PDS_EXPORT led me to


#define PDS_EXPORT
#ifdef __MFC_AFX__
//#include "stdafx.h"
#include <afxwin.h> // this file exists and is a MFC file
#endif
#endif

TIA

Rupesh
Is there another macro above PDS_EXPORT,perhaps #ifndef?

If not then it's the same thing as with previous macro in class name.
Jan 9 '08 #4
Thanks for reply,

Yes it has some # ifdefs and # ifndef
statements.



#define SOME_DILL
#define SOME_EXPORT

THEN IS A series of STATEMENTS LIKE

# ifdef and #ifndef CONTAINING __declspec( dllimport )


AND then

#ifndef __CROSSPLATFORM__
#define SOMETHING_EXPORT
#ifdef __MFC_AFX__
#include <afxwin.h>
#endif
#endif




i HOPE THIS GIVES you some idea of the things happening with the code

Thanks

Rupesh
Jan 9 '08 #5
weaknessforcats
9,208 Expert Mod 8TB
Nowhere is PDS_EXPORT defined as anything other than a symbol.

That makes class PDS_EXPORT someClass just class someClass.

I don't see that the symbol is ever tested with an #ifdef or #ifndef.

Take it out and see what happens. My guess is nothing.
Jan 9 '08 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

25
by: Andrew Dalke | last post by:
Here's a proposed Q&A for the FAQ based on a couple recent threads. Appropriate comments appreciated X.Y: Why doesn't Python have macros like in Lisp or Scheme? Before answering that, a...
7
by: Newbie_sw2003 | last post by:
Where should I use them? I am giving you my understandings. Please correct me if I am wrong: MACRO: e.g.:#define ref-name 99 The code is substituted by the MACRO ref-name. So no overhead....
44
by: Simon Morgan | last post by:
Hi, Can somebody please help me grok the offsetof() macro? I've found an explanation on http://www.embedded.com/shared/printableArticle.jhtml?articleID=18312031 but I'm afraid it still...
0
by: Chris Ellis | last post by:
Hi, I'm trying to write a macro that will generate managed c++ wrappers of map. I want a managed iterator and a managed map. I successfully built a pair of classes (iterator and map) that work...
7
by: fei.liu | last post by:
#define ONCFILE_ERR1(funcname, name) \ { \ #ifdef DEBUG\ cerr << __FILE__ << ":" << __LINE__ << " duplicated call to " << funcname << " " << name << endl; \ #endif \ } I want to have...
10
by: vishnupriya.sureshbabu | last post by:
consider i have two classes A and B. Is it wrong declaring a object of type A with name B? class A{} class B{} A B; Why is it wrong?
2
by: leo.hou | last post by:
Hi experts, I am new to linux and all the type definitions are driving me mad. What is the best way to check a type definition in linux? When I use man page to check some function definition, I...
9
by: holysmoke | last post by:
Hi all, I have a function void actualfunction(unsigned int t, unsigned int lineno) { .... } I want that it is called only from a macro I wrote for it (I don't want to use a wrapper...
16
by: mdh | last post by:
I have asked a few questions about Macros...and think what I have been missing ...and which all who have replied clearly understand...is that this is a Pre-processor action. Hopefully the above is...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.