Code::Blocks Forums

Developer forums (C::B DEVELOPMENT STRICTLY!) => Development => Topic started by: sanjivg on September 24, 2005, 01:10:32 pm

Title: relationship between CompilerOptions and CompileOptionBase classes??
Post by: sanjivg on September 24, 2005, 01:10:32 pm
I couldn't understand how CompilerOptions and CompileOptionsBase classes interact?
what is the relationshipbetween them?

shouldn't all the functionality built into CompileOptionBase class be present into CompilerOptions class? ,thereby making the CompileOptionBase class redundant.

TIA
sanjiv
Title: Re: relationship between CompilerOptions and CompileOptionBase classes??
Post by: jmccay on September 24, 2005, 11:40:56 pm
Quote
I couldn't understand how CompilerOptions and CompileOptionsBase classes interact?
what is the relationshipbetween them?

shouldn't all the functionality built into CompileOptionBase class be present into CompilerOptions class? ,thereby making the CompileOptionBase class redundant.

TIA
sanjiv

I haven't looked at those classes yet, but in general CompileOptionsBase would more than likely be a base class allowing for a common base for use in differences when implementing compiler options (maybe in different languages).  It allows for a pluggin arcitecture.  That's just a rough guess.
joe mccay
Title: Re: relationship between CompilerOptions and CompileOptionBase classes??
Post by: sanjivg on September 26, 2005, 10:00:55 am
Thanks for the reply.

During the weekend I looked into it, and was able to understand it.

CompileOptionBase is a base class for anything that needs support for getting/setting options. It includes the options for entier CompilerSet including compileroptions, includedirs, linkeroptions etc.
The Compiler, Project, and Target classes are derived from it since they need this support.

While CompilerOptions is just an array of CompOption *, which is meant for options listed in checkboxes list in Compiler Flags tab.