Thread: [Dev-C++] Off:Classes Access Restrictions
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: B. <ama...@uo...> - 2002-10-29 01:58:49
|
Gentelmen,
Sorry about the off-topic question, but let me know if you can help:
1. Consider the following Class
Class any{
public:
any (int x=3D0, int y=3D0, int z=3D0);
void dummy_func1();
void not_so_dummy_func2();
void very_important_func3();
void only_for_bad_boys_func4();
private:
int x;
int y;
int z;
};
2. Let suppose 3 different groups of users (supose programmers):
"The dummies", "The Nerds", and "The Bad Boys"
3. I want to restrict the access to the public functions by group,
that is, dummies programs only accessing func1, nerds programs accessing
func1 to func3, and badboys programs accessing all the functions;
4. Is it possible do this, step 3, in C++?
5. If item 4 is possible, is it possible in Dev-C++? How?
Regards
Andr=E9
|
|
From: Per W. <pw...@ia...> - 2002-10-29 11:58:28
|
Should the access restriction be made at compile time or at run time?
/Per W
On Mon, 28 Oct 2002, Andr=E9 Mac=E1rio Barros wrote:
> Gentelmen,
>=20
> Sorry about the off-topic question, but let me know if you can help:
>=20
> 1. Consider the following Class
> Class any{
> public:
> any (int x=3D0, int y=3D0, int z=3D0);
> void dummy_func1();
> void not_so_dummy_func2();
> void very_important_func3();
> void only_for_bad_boys_func4();
> private:
> int x;
> int y;
> int z;
> };
>=20
> 2. Let suppose 3 different groups of users (supose programmers):
> "The dummies", "The Nerds", and "The Bad Boys"
>=20
> 3. I want to restrict the access to the public functions by group,
> that is, dummies programs only accessing func1, nerds programs accessing
> func1 to func3, and badboys programs accessing all the functions;
>=20
> 4. Is it possible do this, step 3, in C++?
>=20
> 5. If item 4 is possible, is it possible in Dev-C++? How?
>=20
> Regards
> Andr=E9
>=20
>=20
>=20
>=20
>=20
>=20
> -------------------------------------------------------
> This sf.net email is sponsored by:ThinkGeek
> Welcome to geek heaven.
> http://thinkgeek.com/sf
> _______________________________________________
> Dev-cpp-users mailing list
> Dev...@li...
> TO UNSUBSCRIBE: http://www.noicys.cjb.net/devcpp/ub.htm
> https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
>=20
|
|
From: B. <ama...@uo...> - 2002-10-29 12:07:43
|
Have no preference. But I could say that it would be better the "dummies"=
and
"nerds" even don't know that they could make "more things" using the clas=
s
any. Compile time maybe?
Regards
Andr=E9
Per Westermark wrote:
> Should the access restriction be made at compile time or at run time?
>
> /Per W
>
> On Mon, 28 Oct 2002, Andr=E9 Mac=E1rio Barros wrote:
>
> > Gentelmen,
> >
> > Sorry about the off-topic question, but let me know if you can hel=
p:
> >
> > 1. Consider the following Class
> > Class any{
> > public:
> > any (int x=3D0, int y=3D0, int z=3D0);
> > void dummy_func1();
> > void not_so_dummy_func2();
> > void very_important_func3();
> > void only_for_bad_boys_func4();
> > private:
> > int x;
> > int y;
> > int z;
> > };
> >
> > 2. Let suppose 3 different groups of users (supose programmers):
> > "The dummies", "The Nerds", and "The Bad Boys"
> >
> > 3. I want to restrict the access to the public functions by group,
> > that is, dummies programs only accessing func1, nerds programs access=
ing
> > func1 to func3, and badboys programs accessing all the functions;
> >
> > 4. Is it possible do this, step 3, in C++?
> >
> > 5. If item 4 is possible, is it possible in Dev-C++? How?
> >
> > Regards
> > Andr=E9
> >
> >
> >
> >
> >
> >
> > -------------------------------------------------------
> > This sf.net email is sponsored by:ThinkGeek
> > Welcome to geek heaven.
> > http://thinkgeek.com/sf
> > _______________________________________________
> > Dev-cpp-users mailing list
> > Dev...@li...
> > TO UNSUBSCRIBE: http://www.noicys.cjb.net/devcpp/ub.htm
> > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
> >
|
|
From: Teodorescu C. <te...@xt...> - 2002-10-30 07:39:33
|
André Macário Barros wrote:
>Gentelmen,
>
> Sorry about the off-topic question, but let me know if you can help:
>
> 1. Consider the following Class
> Class any{
> public:
> any (int x=0, int y=0, int z=0);
> void dummy_func1();
> void not_so_dummy_func2();
> void very_important_func3();
> void only_for_bad_boys_func4();
> private:
> int x;
> int y;
> int z;
> };
>
> 2. Let suppose 3 different groups of users (supose programmers):
> "The dummies", "The Nerds", and "The Bad Boys"
>
> 3. I want to restrict the access to the public functions by group,
>that is, dummies programs only accessing func1, nerds programs accessing
>func1 to func3, and badboys programs accessing all the functions;
>
> 4. Is it possible do this, step 3, in C++?
>
On windows YES :) . Write a COM with license and authentication .
Put restriction on your interface and you can use windows groups and
what ever you wan't.
>
> 5. If item 4 is possible, is it possible in Dev-C++? How?
>
i don't know but you can use any ide that know COM like borland
c-builder Delphi i think you can use borland compiler (i nerver tied)
and of course VC ++ ($$$$)
Sorry if my answer is not such explicit in how to do it.There are a lot
of tutorials on web so you can use abny of them.
>
>Regards
>André
>
>
>
>
>
>
>-------------------------------------------------------
>This sf.net email is sponsored by:ThinkGeek
>Welcome to geek heaven.
>http://thinkgeek.com/sf
>_______________________________________________
>Dev-cpp-users mailing list
>Dev...@li...
>TO UNSUBSCRIBE: http://www.noicys.cjb.net/devcpp/ub.htm
>https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
>
>
--
Best Regards Teodorescu Cristian Liviu (te...@xt...)
|