Redian新闻
>
请教:monoclonal antibody development
avatar
请教:monoclonal antibody development# Biology - 生物学
p*r
1
How to count the number of instances for all classes? One way is to add a
static int field to every class and increase this static int by one in all
constructors and the assignment operator and decease it by one in the
destructor. The interviewer wants to know if there is any way to avoid
adding a static int to every class?
avatar
S*l
3
请有经验的前辈推荐一个提供制作单抗服务的公司。网上有几百家公司,无从下手。谢
谢。
avatar
s*t
4
add a static int to global?

【在 p*********r 的大作中提到】
: How to count the number of instances for all classes? One way is to add a
: static int field to every class and increase this static int by one in all
: constructors and the assignment operator and decease it by one in the
: destructor. The interviewer wants to know if there is any way to avoid
: adding a static int to every class?

avatar
p*r
7
Let me clarify the question. He wants to count the number of instances for
each class. So global int does not work.

【在 s*********t 的大作中提到】
: add a static int to global?
avatar
g*5
9
how about their polyantibodies?
avatar
p*r
10
I think I get the answer now. Use a template, private inheritance and
multiple inheritance.
avatar
c*e
12
我回国就开个这样的公司,一般3周拿到抗体,连同抗体序列。¥10,000美金起头,不
知道有没有兴趣
avatar
h*k
13
所有class继承一个计数器class? 那你还是要在那个class里声明一个静态变量。

【在 p*********r 的大作中提到】
: I think I get the answer now. Use a template, private inheritance and
: multiple inheritance.

avatar
b*2
14
hehe
avatar
p*r
15
只需在计数器class template里声明一个静态变量

【在 h**k 的大作中提到】
: 所有class继承一个计数器class? 那你还是要在那个class里声明一个静态变量。
avatar
y*j
16
avatar
z*e
17
i think we can keep a reference counter such like
private:
int* ref;
Just like shared_ptr does.
what do you think?
Thanks.

【在 p*********r 的大作中提到】
: How to count the number of instances for all classes? One way is to add a
: static int field to every class and increase this static int by one in all
: constructors and the assignment operator and decease it by one in the
: destructor. The interviewer wants to know if there is any way to avoid
: adding a static int to every class?

avatar
t*s
18
顺便说一下,这个机箱的设计比较搓
avatar
a*n
19
using template to generate concrete class with static counter
avatar
f*w
20
We can use factory, and keep track number of objects created.
相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。