資源描述:
《C Coding Standard(Herb Sutter)》由會員上傳分享,免費(fèi)在線閱讀,更多相關(guān)內(nèi)容在學(xué)術(shù)論文-天天文庫。
1、C++CodingStandardC++CodingStandardLastModified:2000-04-14tmh@possibility.com/MyHomePageUsingthisStandard.Ifyouwanttomakealocalcopyofthisstandardanduseitasyourownyouareperfectlyfreetodoso.That'swhyImadeit!IfyoufindanyerrorsormakeanyimprovementspleaseemailmethechangessoIcan
2、mergethemin.RecentChanges.Contents●Introduction?StandardizationisImportant?Interpretation?StandardsEnforcement?AcceptinganIdea?6PhasesofaProject(joke)?FlowChartofProjectDecisionMaking(joke)?OnLeadership●Resources-TakeaLook!?DesignStories?PatternsHomePage?OOInfoSources?Uni
3、fiedModelingLanguage(UML)?OPENMethod?OOFAQ-AllYouWantedtoKnowAboutOO?C++FAQ-AllYouWantedtoKnowAboutC++?C++SourceLibraries?C++Tutorials?ACEC++Library?CollectionofOtherStandards?DesignbyContractfromEiffle?C++isn'tPerfect,HereareSomeReasonsWhy?ccdoc-isa'javadoc'likeutilityth
4、atextractscommentsandrelevantinformationfromyourC++/CprogramsandgeneratesHTMLpagesfromit.?ConstCorrectness-AverynicearticleonconstcorrectnessbyChadLoder.?IntroductiontoCRCCards-AveryniceintrodctiontoCRCcards.?AbraxisCodeCheck-Aprogramforcheckingcodeforcodingstandardviolat
5、ionsandotherproblems.file:///E
6、/Computer/Program%20Design/C%20And%20C++/C++%20Coding%20Standard.htm(1of73)[2003-4-920:52]C++CodingStandard●Names?MakeNamesFit?NoAllUpperCaseAbbreviations?ClassNames?ClassLibraryNames?MethodNames?ClassAttributeNames?MethodArgumentNames?Varia
7、bleNamesontheStack?PointerVariables?ReferenceVariablesandFunctionsReturningReferences?GlobalVariables?GlobalConstants?StaticVariables?TypeNames?EnumNames?#defineandMacroNames?CFunctionNames?C++FileExtensions●Documentation?CommentsonComments?CommentsShouldTellaStory?Docume
8、ntDecisions?UseHeaders?MakeGotchasExplicit?InterfaceandImplementationDocumentation?DirectoryDocumentation?IncludeStatementDocumentation?BlockComments●ComplexityManagement?Layering?MinimizeDependencieswithAbstractBaseClasses?Liskov'sSubstitutionPrinicple?Open/ClosedPrincip
9、le?Register/DispatchIdiom?Delegation?FollowtheLawofDemeter?DesignbyContract●Classes?NamingClassF