RobotVision Coding Standard

Nomenclature

HeaderFile

1.

#ifndef __Robot_Vision_H__

#define __Robot_Vision_H__

#endif

2.

RobotVision.cpp:

 

#include "RobotVision.h"    //header file

 

#include <stdio.h>          //c standard header file

#include <time.h>

 

#include <string>           //cpp standard header file

#include <vector>

 

#include <GL/glut.h>        //third party header file

 

#include <RV_SkelAnimated>  //solution header file

 

NameSpace

#define _RV_BEGIN       namespace RV{

#define _RV_END        }

#define _RV            RV::

 

Variable:

int num_errors;

 

Member Variable:

int x_;

bool is_lock_;

 

Global Variable:

void* g_render_system;

 

Enumerator:

enum RVFPARAM

{

     RVF_Actor,

     RVF_Terrain,

     RVF_Water,

     RVF_Model,

     RVF_Fog,

     RVF_Gfx,

};

 

Macro:

#define RV_NEW                   new

#define RV_DELETE                delete

#define RV_SAFE_DELETE(p)        {delete (p); (p) = 0;}

#define RV_SAFE_DELETE_ARRAY(p)  {delete [] (p); (p) = 0;}

 

 

Function

1:     Regular

bool Initialize();

void Elapsed();

void Update();

2:    Accessor

inline int set_x(int x) const {x_ = x;}

inline int set_y(int y) const {y_ = y;}

3:     Private

inline bool has_buf();

inline void set_buf(const void* buf);

inline void clear_buf();

 

Abbreviation 

posted @ 2011-10-21 17:49  燎原火  阅读(113)  评论(0编辑  收藏  举报