⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 vc15head.sct

📁 c#设计模式WithCla
💻 SCT
字号:
// Class: CLASS_NAME			//Visual C++ with QuickWin

#ifndef __$CAPITALIZE_ALL$TRUNCATE_EIGHT$CLASS_NAME$_H  //Required for current class
  #define __$CAPITALIZE_ALL$TRUNCATE_EIGHT$CLASS_NAME$_H

#ifndef __IOSTREAM_H            //Required for cin and cout
  #include <iostream.h>                 
#endif
[                               //Required for base classes
#ifndef __$CAPITALIZE_ALL$TRUNCATE_EIGHT$BASE_CLASS$_H
  #include "TRUNCATE_EIGHT$BASE_CLASS$.h"
#endif]                               
[#include <INCLUDE_FILE>        //Required for include files]                               
[                               //Required for 1:1 associated classes
#ifndef __$CAPITALIZE_ALL$TRUNCATE_EIGHT$ASSOCIATION_ONE_CLASS$_H
  #include "TRUNCATE_EIGHT$ASSOCIATION_ONE_CLASS.h"
#endif]                                                               
[                               //Required for 1:1 aggregation (part) classes
#ifndef __$CAPITALIZE_ALL$TRUNCATE_EIGHT$AGGREGATION_ONE_CLASS$_H
  #include "TRUNCATE_EIGHT$AGGREGATION_ONE_CLASS$.h"
#endif]                                                               
[                               //Required for 1:M associated classes
#ifndef __$CAPITALIZE_ALL$TRUNCATE_EIGHT$ASSOCIATION_MANY_CLASS$_H
  #include "TRUNCATE_EIGHT$ASSOCIATION_MANY_CLASS$.h"
#endif]                                                               
[                               //Required for 1:M aggregation (part) classes
#ifndef __$CAPITALIZE_ALL$TRUNCATE_EIGHT$AGGREGATION_MANY_CLASS$_H
  #include "TRUNCATE_EIGHT$AGGREGATION_MANY_CLASS$.h"
#endif]
class CLASS_NAME[NO_RETURN NO_REPEAT: NO_REPEAT public BASE_CLASS ,DELETE_LAST_SYMBOL] CLASS_LIBRARY_BASE_CLASS     
{ [ATTRIBUTE_TYPE ATTRIBUTE_NAME$;]
  [ASSOCIATION_ONE_CLASS$* ASSOCIATION_ONE_NAME$;]
  [AGGREGATION_ONE_CLASS AGGREGATION_ONE_NAME$;]
  [CPtrList ASSOCIATION_MANY_NAME$;]
  [CObList AGGREGATION_MANY_NAME$;]
public:
			//Default constructor
			//Update to access base class attributes 
			//Update to access 1:1 part class attributes 
			//Update to access 1:M part class attributes
			//Update to access 1:1 associated class attributes
			//Update to access 1:M associated class attributes
			//Ensure initial values entered
  CLASS_NAME () :[NO_RETURN ATTRIBUTE_NAME(ATTRIBUTE_INITIAL_VALUE),DELETE_LAST_SYMBOL]  { } 

			//Constructor with arguments
  CLASS_NAME ([NO_RETURN ATTRIBUTE_TYPE a$ATTRIBUTE_NAME,DELETE_LAST_SYMBOL] )       
  : [NO_RETURN ATTRIBUTE_NAME (a$ATTRIBUTE_NAME),DELETE_LAST_SYMBOL] { }        
  
			//Copy constructor
			//Update to access 1:M part class attributes
			//Update to access 1:1 associated class attributes
			//Update to access 1:M associated class attributes      
  CLASS_NAME (const CLASS_NAME$& a$CLASS_NAME ) [NO_RETURN NO_REPEAT: BASE_CLASS (a$CLASS_NAME),DELETE_LAST_SYMBOL]
  { [  ATTRIBUTE_NAME = a$CLASS_NAME$.$ATTRIBUTE_NAME;]
    [AGGREGATION_ONE_NAME = a$CLASS_NAME$.$AGGREGATION_ONE_NAME;]            
  }                                     

			//Operator= Assignment Operator
			//Update to access 1:M part class attributes
			//Update to access 1:1 associated class attributes
			//Update to access 1:M associated class attributes      
  CLASS_NAME operator= (const CLASS_NAME$& a$CLASS_NAME)
  { if (this == &a$CLASS_NAME) return *this;          
  [BASE_CLASS$::operator= (a$CLASS_NAME);]
  [ATTRIBUTE_NAME = a$CLASS_NAME$.$ATTRIBUTE_NAME;]
  [AGGREGATION_ONE_NAME = a$CLASS_NAME$.$AGGREGATION_ONE_NAME;]      
  return *this;                                                                                                 
  }                                     
			//Operator== Equality Operator
			//Update to access 1:M part class attributes
			//Update to access 1:1 associated class attributes
			//Update to access 1:M associated class attributes      
  int operator== (const CLASS_NAME$& a$CLASS_NAME)
  { return (
[  (BASE_CLASS$::operator== (a$CLASS_NAME)) &&]
[  (AGGREGATION_ONE_NAME == a$CLASS_NAME$.$AGGREGATION_ONE_NAME) &&]
[  (ATTRIBUTE_NAME == a$CLASS_NAME$.ATTRIBUTE_NAME) &DELETE_LAST_SYMBOL&DELETE_LAST_SYMBOL]
  );
  }                             

			//Operator<< for cout 
  friend ostream& operator<< (ostream& os, CLASS_NAME$& a$CLASS_NAME);

			//Operator<< for cin
  friend istream& operator>> (istream& is, CLASS_NAME$& a$CLASS_NAME);
			
[                       //Get accessor function for attribute
  ATTRIBUTE_TYPE get$ATTRIBUTE_NAME$() const
  {return ATTRIBUTE_NAME$;
  }
]                       
[                       //Set accessor function for attribute
  void set$ATTRIBUTE_NAME ($ATTRIBUTE_TYPE a$ATTRIBUTE_NAME$)
  { ATTRIBUTE_NAME = a$ATTRIBUTE_NAME$;
  }
]                       
[                       //Get accessor function for 1:1 aggregation
  AGGREGATION_ONE_CLASS$& get$AGGREGATION_ONE_NAME$() 
  {return AGGREGATION_ONE_NAME$;
  }
]                       
[                       //Set accessor function for 1:1 aggregation
  void set$AGGREGATION_ONE_NAME ($AGGREGATION_ONE_CLASS$& a$AGGREGATION_ONE_NAME$)
  { AGGREGATION_ONE_NAME = a$AGGREGATION_ONE_NAME$;
  }
]                       
[                       //Get accessor function for 1:1 association
  ASSOCIATION_ONE_CLASS$* get$ASSOCIATION_ONE_NAME$() const
  {return ASSOCIATION_ONE_NAME$;
  }
]                       
[                       //Set accessor function for 1:1 association
  void set$ASSOCIATION_ONE_NAME ($ASSOCIATION_ONE_CLASS$* a$ASSOCIATION_ONE_NAME$)
  { ASSOCIATION_ONE_NAME = a$ASSOCIATION_ONE_NAME$;
  }
]
[  CPP_OPERATION_VIRTUAL CPP_OPERATION_STATIC OPERATION_RETURN_TYPE OPERATION_NAME (CPP_OPERATION_PARAMETERS) CPP_OPERATION_CONSTANT CPP_OPERATION_PURE_VIRTUAL;
] 
  OPERATION_CPP_VIRTUAL_BASE_CLASS ~ CLASS_NAME ( ) { }       //Destructor
};

#endif


⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -