
pravarthanakshamamaaya (sii + +)

sii + + prograaming bhaashayude pashchaathalatthil, kokvij _ 1 ennathu sii + + staanderd libraryude bhagamaaya oru header fayaline soochippikkunnu, koodaathe ganitha, thaarathamyangal, yukthi ennivaykkulla pravartthanangal ulppede function objectukalkkaayi munkootty nirvachikkapetta klaas templettukalude oru koottam nalkunnu. eee klaas templettukalude udaaharanagal oru function kooll oopparettare nirvachikkunna sii + + klaasukalaanu, eee klaasukalude udaaharanangale avaa functionukalaanennu vilikkam. munkootty nirvachicha function objectukalum function object adapterukalum samyojippichukondu oru puthiya function object ezhuthaathe valare sankeernamaaya pravartthanangal nadatthaan kazhiyum.
sii + + 11 nalkunna klaas template kokwos _ 2 oru pothu-uddeshya polymorphic function raapparaan. kookk _ 2-nte udaaharanangalkk vilikkaavunna eathenkilum taargett-functionukal, lamda expressionukal (anjjaatha functionukal nirvachikkunna expressionukal), bined expressionukal (chila aargyumentukalkk moolyangal nalkikkond cheria arattiyude mattu functionukalilekku functionukal parivartthanam cheiyunna function adapterukalude udaaharanagal), allengil mattu function objectukal enniva sambharikkaanum pakarthaanum abhyarthikkaanum kazhiyum.
sii + + staanderd library nalkunna algorithangalkku randil kooduthal aargyumentukalude function objectukal aavasyamilla. booliyan moolyangal nalkunna function objectukal oru pradhana prathyeka kesaanu. ritten tharamulla oru yoonari functione "predicade" ennum ritten tharamulla oru bainari functione "bainari predicade" ennum vilikkunnu.
anuyojyamaaya function objectukal.
pothuve, oru function objectinu athinte vaadathinte tharatthil niyanthranangalund. tharam niyanthranangal lalithamayirikkanamennilla, ennirunnaalum overload cheythirikkaam allengil oru anga template aakam. athupole, aaa niyanthranangal enthaanennu nirnnayikkaan oru prograaminu oru maargavum aavasyamilla. ennirunnaalum, oru adaptable function object, aargyumentum ritten tharangalum enthaanennu vyakthamaakkukayum aaa tharangalkk prograamukalil peridaanum upayogikkaanum kazhiyunna tharatthil nested ezz nalkukayum cheiyunnu. oru tharam anuyojyamaaya janarettarinte oru maathrkayaanenkil, athu nirvachikkanam. athupole, anuyojyamaaya yoonari functionte oru modalaanengil, athu nirvachikkanam, koodaathe anuyojyamaaya bainari functionte oru modalaanengil, athu nirvachikkanam,,,. sii + + staanderd library adisthaana klaasukal nalkukayum anuyojyamaaya yoonari functionukaludeyum anuyojyamaaya bainari functionukaludeyum nirvachanam lalithamaakkukayum cheiyunnu.
anuyojyamaaya function objectukal pradhaanamaan, kaaranam avaa function object adapters upayogikkaan kazhiyum mattu function objectukale parivartthanam cheiyukayo kaikaaryam cheiyukayo cheiyunna function objectukal. sii + + staanderd library niravadhi vyathyastha function object adapterukal nalkunnu, avayil (oru prathyeka adaptable predicate nalkunna moolyathinte logical compliment nalkunnava), koodaathe, function objectinte ghadana nirvahikkunnavayum ulppedunnu.
munkootty nirvachicha function objectukal.
sii + + staanderd libraryil header phayal kokvi _ 1 ll ganitha pravartthanangal (,,,,,,), thaarathamyangal (,,,,,), logical pravartthanangal (,,,) ennivayulppede niravadhi vyathyastha munkootty nirvachikkapetta function objectukal ulppedunnu.
udaaharanagal.
function rapperukal saadhaarana functionukalilekku vilicano lamda expressionukal srishticha objectukal pravartthippikkaano upayogikkaam.
/* oru template function nirvachikkuka */
template <typenem tii>
achadi moolyam shoonyamaakkuka (tii moolyam) {
 STD:: cout "moolyam" STD:: endle;
int maine (shoonyam) {
 / * oru functionilekkulla oru function rapper */
 STD:: function <shoonyamaaya (int)> funk _ eiii = print value <int>;
 funk _ eiii (2015);
 / * oru function poyintarilekkulla oru function rapper */
 STD:: function <shoonyamaaya (int)> funk _ bii = & print value <int>;
 funk _ bii (2016);
 / * oru lamda functionilekkulla oru function rapper. */
 std:: function <shoonya (int)> funk sii = [] (int moolyam) {
 STD:: cout "moolyam" STD:: endle;
 funk _ sii (2017);
 / * std:: bind () srishticha oru function rapper.
 * binding cheyyumbol munkootty nirvachicha oru paaraameettar paas cheyyuka.
 STD:: function <void (void)> funk _ dii = STD:: bined (print value <STD:: string>, "paii aanu");
 funk _ dii ();
 / * std:: bind () srishticha oru function rapper.
 * function vilikkumbol oru paaraameettar paas cheyyuka.
 STD:: function <shoonyamaanu (float)> funk _ iii =
 STD:: bined (print value <float>, STD:: placeholdermaar: _ 1);
 funk _ iii (<aii. dii. 1>);
amgangalude variabilukalum klaasukalude amgangalude pravartthanangalum axus cheiyunnathinum function rapperukal upayogikkaam.
template <typenem tii>
klaas kaanaidatta {
 pothujanangal
 t m _ moolyam;
int maine () {
 / * oru classinte memper veriyabililekkulla oru function rapper */
 kaanaidatta <int> daatta _ a {2016};
 STD:: function <int (canydata <int> &)> func _ a = & canydata <int>:: m _ moolyam;
 STD:: cout "func _ a (Data _ a)" STD:: endell;
 / * paaraameettar pasakathe anga functionilekkulla oru function rapper */
 kaanaidatta <float> daatta _ bii {2016.1};
 STD:: function <void (kaanaidatta <float> &)> phank _ bii = & kaanaidatta <float>:: print;
 funk _ bii (daatta _ bii);
 / * oru paaraameettar paas cheiyunna anga functionilekkulla oru function rapper */
 STD:: function <void (kaanaidatta <float> &, float)> funk _ sii =
 & canydata <floot>:: printaferred;
 funk sii (daatta bii, 0.1);
 / * stadit bined srishticha anga functionilekkulla oru function rapper */
 STD:: function <void (float)> funk _ dii = STD:: bined (& canydata <float>:: printaafattaraad,
 & daatta _ bii, stadit placeholdermaar: _ 1);
 funk _ dii (0.20);

