Revision 2 as of 2014-02-26 16:50:23

Clear message

Files

Definitions

   1 namespace SAFplus
   2   {
   3   class Checkpoint  // Class
   4     {
   5     ...
   6     }; 
   7 
   8   typedef enum  // Enum
   9     {
  10     LOG_SEV_EMERGENCY = 0x1,
  11     ...
  12     };
  13 
  14   Logger* logInitialize(void);  // A function
  15 
  16   int logSeverity;  // A Variable
  17   };

   1 namespace SAFplusI
   2   {
   3 
   4   };

clSvcIpi.hxx

   1   namespace SAFplusI
   2   {
   3     class InternalObject
   4       {
   5       ...
   6       };
   7   };

clSvcApi.hxx

   1   #include <clSvcIpi.hxx>
   2   namespace SAFplus
   3   {
   4     class Svc
   5       {
   6       ...
   7       InternalObject& getIo(char* key);  // WRONG: InternalObject is exposed to the application so should be in the API, not IPI.
   8 
   9       protected:
  10       InternalObject array[20];
  11       };
  12   };

   1 namespace SAFplusI
   2   {
   3     class InternalObject;  // Predeclaration
   4   };
   5 
   6 namespaces SAFplus
   7   {
   8     class Svc
   9       {
  10       ...
  11       protected: 
  12       InternalObject* array;
  13       };
  14   };