Mailing List archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[linux-dvb] NEWSTRUCT: type names
I'm just in the process of implementing all parameters necessary
for supporting DVB-C and DVB-T into VDR. In doing so I want to give
my cChannel class a member function that returns, for instance, the
"hierarchy" value, as in
class cChannel {
...
private:
Hierarchy hierarchy;
public:
Hierarchy Hierarchy(void) { return hierarchy; }
...
};
The name of the function shall be Hierarchy(), but since the return
value will have to be of type Hierarchy (as defined in the driver's
frontend.h), I'm facing a naming problem here.
Wouldn't it be better to use some naming convention for typedefs/enums
in the driver? Something like
typedef enum {
HIERARCHY_NONE,
HIERARCHY_1,
HIERARCHY_2,
HIERARCHY_4,
HIERARCHY_AUTO
} eHierarchy;
Note the 'e' in front of the type name, marking it as an 'enum'.
Then my class could be
class cChannel {
...
eHierarchy Hierarchy(void) { return hierarchy; }
...
};
The same applies to many other enums in the driver.
For the moment I'll make my functions return 'int' and typecast
the result when calling them...
Klaus
--
_______________________________________________________________
Klaus Schmidinger Phone: +49-8635-6989-10
CadSoft Computer GmbH Fax: +49-8635-6989-40
Hofmark 2 Email: kls@cadsoft.de
D-84568 Pleiskirchen, Germany URL: www.cadsoft.de
_______________________________________________________________
--
Info:
To unsubscribe send a mail to listar@linuxtv.org with "unsubscribe linux-dvb" as subject.
Home |
Main Index |
Thread Index