[ Web Proxy ]
URL:
Viewing: https://raw.githubusercontent.com/memorywalker/Notes/master/cpp/googlecpp.md [Back]  [Original]

###Head File
* #define  `___H_`
```
#ifndef BASEITEM_H
#define BASEITEM_H
// code

#endif // BASEITEM_H
```

* forward declarations.h #include 
Foo()
1)  Foo *  Foo &
2)  Foo ()
3) Foo
 Foo  Foo 


* 10
* -inl.h
* 
* 
    1. cpp
    2. C
    3. C++
    4. 
    5. 
    
###Scope
* .cc.h 
```
namespace {
// namespace
enum ALGIN { RIGHT, LEFT, MIDLE};
ALGIN algin() { return RIGHT;};

} // namespace
```
* //
* using
* .cc.husing`namespace fbz=::foo::bar::baz`
* public
```
class Container
{
// 
private:
    class Transformer
    {

    public:
        Transformer();
        ~Transformer();

        void transform(BaseItem* item);
    };

public:
    Container();
    ~Container();

    void addItem(BaseItem* item);
    void doTransform();

private:
    std::vector m_vItems;
    Transformer m_transformer;
};
```

* 
* 
* .ccstatic(static int Foo())
* 
* 
* class(stlvectorstring)bug
* singleton pattern
* Cstlstring`const char key[] = "MOMS_CAT";`
* ccstatic
* class

###class
* Init()
1. 
2. 
3. 
4. main

* 
* explicit
* (stl)DISALLOW_COPY_AND_ASSIGNstlstd::tr1::shared_ptrstl
```
#define DISALLOW_COPY_AND_ASSIGN(TypeName) \
    TypeName(const TypeName&); \
    void operator=(const TypeName&)
    
// private
private:
    DISALLOW_COPY_AND_ASSIGN(Container);
```
* public
* virtualvirtual
* Interface
* Equals()/CopyFromstl==operator

Web Proxy Viewer  |  New URL  |  Original Page