Featured post

c# - Usage of Server Side Controls in MVC Frame work -

i using asp.net 4.0 , mvc 2.0 web application. project requiremrnt have use server side control in application not possibl in noraml case. ideally want use adrotator control , datalist control. i saw few samples , references in codepleax mvc controllib howwver found less useful. can tell how utilize theese controls in asp.net application along mvc. note: please provide functionalities related adrotator , datalist controls not equivalent functionalities thanks in advace. mvc pages not use normal .net solution makes use of normal .net components impossible. a normal .net page use event driven solution call different methods service side mvc use actions , view completly different way handle things. also, mvc not use viewstate normal .net controlls require. found article discussing mixing of normal .net , mvc.

C++ a class to be used only by another class -


i'm building class (class a) needs able create number of instances of class (class b) in course of operation, class b used few member functions of class a, , never used outside of class. how should class b best defined? practical / reasonable make private member of class a? intended purpose of nested classes, or parting spirit of construct?

thanks, wyatt

edit: on further consideration, i'm not asking best practice, personal project. want include class b member of class encapsulation standpoint - seems reasonable class wholly subordinate should in fact part of owning class.

what i'm wondering whether or not reasonable use-case nested classes? if not, purpose of nested classes?

one possibility define namespace called detail inside namespace put classes. e.g.

// public_namespace_detail.hpp namespace public_namespace {     namespace detail     {         class b         {           ...         };      } }  // public_namespace.hpp #include "public_namespace_detail.hpp"  namespace public_namespace {     class     {        detail::b b;        ...            }; } 

Comments

Popular posts from this blog

c# - Usage of Server Side Controls in MVC Frame work -

cocoa - Nesting arrays into NSDictionary object (Objective-C) -

ios - Very simple iPhone App crashes on UILabel settext -